<?php
$nagl = "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
$nagl .= "Accept-Language: pl\r\n";
$nagl .= "Accept-Encoding: gzip, deflate\r\n";
$nagl .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n";
$nagl .= "Host: www.miastoplusa.pl";
$nagl .= "Connection: Keep-Alive";
$data = "GET / HTTP/1.1\r\n".$nagl;
$sock = fsockopen('www.miastoplusa.pl', 80, &$errno, &$errstr, 30);
fputs($sock, $data); $html = "";
while(!feof($sock)) $html .= fgets($sock, 4096);
echo($html);
fclose($sock);
?>
zwraca mi ze jest zle zadanie ale patrzylem HTTPLook i tam jest takie samo:
GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, /
Accept-Language: pl
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Host: www.miastoplusa.pl
Connection: Keep-Alive
Co robie zle ?