diff options
author | Christian Schneider | 2016-06-14 17:18:27 +0200 |
---|---|---|
committer | Christian Schneider | 2016-06-14 17:18:27 +0200 |
commit | 4b2022b809e37a10261fe49e1fd7ff59716151e8 (patch) | |
tree | dce97edb4ff92744da6156320496d22444e3dc89 /it_url.class | |
parent | 0c46fb484031f4bbfd69534138bb007e55d1e129 (diff) | |
download | itools-4b2022b809e37a10261fe49e1fd7ff59716151e8.tar.gz itools-4b2022b809e37a10261fe49e1fd7ff59716151e8.tar.bz2 itools-4b2022b809e37a10261fe49e1fd7ff59716151e8.zip |
Also set default headers (like X-Ultra-Https) for get_multi
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/it_url.class b/it_url.class index 2a9694c..11be048 100644 --- a/it_url.class +++ b/it_url.class @@ -375,10 +375,8 @@ function get_multi($p=null) { $p += array('retries' => 1); - $p['headers'] = (array)$p['headers'] + array( - 'User-Agent' => "Mozilla/4.0 (compatible; MSIE 7.0; ITools)", - 'Accept-Language' => T_lang(), - ); + $url = new it_url; + $p['headers'] = (array)$p['headers'] + array_diff_key(self::_default_headers($url, $p), ['Host' => null]); $opts = array(CURLOPT_FOLLOWLOCATION => true) + self::curl_opts($p); |