С помощю курл отправляю заголовки PHP: $this_header = array( "Referer: [url=http://www.site.com/]http://www.site.com/[/url]", "Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" ); curl_setopt($ch, CURLOPT_HTTPHEADER, $this_header); в результате в логах доступ делаю к page.php, но дает Agent - вообще пусто В чем причина?
PHP: $this_header = array( 'Referer' => 'http://www.site.com/', 'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)' ); curl_setopt($ch, CURLOPT_HTTPHEADER, $this_header); так? тогда в логах "GET /page.php HTTP/1.0" 200 8274 "-" "-" полный листинг скрипта PHP: function file_get_content($url,$str) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $this_header = array( 'Referer' => 'http://www.site.com/', 'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)' ); curl_setopt($ch, CURLOPT_HTTPHEADER, $this_header); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $str = curl_exec($ch); curl_close($ch); return $str; } $str=file_get_content("http://site.net/page.php",$str);
так ка правильно сделать, чтобы в логах был Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ?