/** * No need to call this. * @param string $url URL to open * @param Config $iconf Optionally pass in the Config object to use */ public function __construct($url, Config $iconf = null) { parent::__construct(); $this->urltoopen = $url; if (!$iconf) { $iconf = new Config(); } $this->addHeaderLine('Referer', 'http://' . $iconf->imdbsite . '/'); if ($iconf->force_agent) { $this->addHeaderLine('User-Agent', $iconf->force_agent); } if ($iconf->language) { $this->addHeaderLine('Accept-Language', $iconf->language); } }
/** * No need to call this. * @param string $url URL to open * @param Config $iconf Optionally pass in the Config object to use */ public function __construct($url, Config $iconf = null) { parent::__construct(); $this->urltoopen = $url; if (!$iconf) { $iconf = new Config(); } $this->addHeaderLine('Referer', 'http://' . $iconf->imdbsite . '/'); if ($iconf->force_agent) { $this->addHeaderLine('User-Agent', $iconf->force_agent); } if ($iconf->language) { $this->addHeaderLine('Accept-Language', $iconf->language); } // Hack us into a session that uses the new layout $this->addHeaderLine('Cookie', "session-id=477-7065933-2802665; session-id-time=1607695465"); }