diff --git a/src/rss.php b/src/rss.php index 18287d6..22c2278 100644 --- a/src/rss.php +++ b/src/rss.php @@ -1,4 +1,6 @@ [ + 'verify_peer' => false, + 'verify_peer_name' => false, + ], + ]); + + $header = ""; $content_type = ""; + $validhost = filter_var(gethostbyname(parse_url($url,PHP_URL_HOST)), FILTER_VALIDATE_IP); + if ($validhost) { + $header = get_headers($url, true); + } else { + return false; + } + // Find $type_name in header if (isset($header["Content-Type"])) $content_type = $header["Content-Type"];