diff --git a/src/Feed.php b/src/Feed.php index 3a59c27..5d80ec1 100644 --- a/src/Feed.php +++ b/src/Feed.php @@ -20,6 +20,12 @@ class Feed /** @var SimpleXMLElement */ protected $xml; + + /** @var string */ + public static $cookie; + + /** @var string */ + public static $proxyHostPort; /** @@ -213,6 +219,12 @@ private static function httpRequest($url, $user, $pass) if ($user !== null || $pass !== null) { curl_setopt($curl, CURLOPT_USERPWD, "$user:$pass"); } + if (self::$cookie) { + curl_setopt($curl, CURLOPT_COOKIE, self::$cookie); + } + if (self::$proxyHostPort) { + curl_setopt($curl, CURLOPT_PROXY, self::$proxyHostPort); + } curl_setopt($curl, CURLOPT_USERAGENT, self::$userAgent); // some feeds require a user agent curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_TIMEOUT, 20);