From 4b2022b809e37a10261fe49e1fd7ff59716151e8 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 14 Jun 2016 17:18:27 +0200 Subject: Also set default headers (like X-Ultra-Https) for get_multi --- it_url.class | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'it_url.class') 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); -- cgit v1.2.3