oto kod
Kod
<?php
$fp=fsockopen("wp.pl", 80);
fwrite($fp, "GET /index.php HTTP/1.1
User-Agent: Opera/9.50 (Windows NT 5.1; U; en)
Host: wp.pl
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: pl-PL,pl;q=0.9,en;q=0.8
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, identity, *;q=0
Cache-Control: no-cache
Connection: Keep-Alive, TE
TE: deflate, gzip, chunked, identity, trailers
");
ob_start();
echo fread($fp, 9000);
$dane2 = ob_get_contents();
$file = "wp.txt";
$fp = fopen($file, "a+");
fwrite($fp, stripslashes($dane2));
ob_end_clean();
fclose($fp);
?>
$fp=fsockopen("wp.pl", 80);
fwrite($fp, "GET /index.php HTTP/1.1
User-Agent: Opera/9.50 (Windows NT 5.1; U; en)
Host: wp.pl
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: pl-PL,pl;q=0.9,en;q=0.8
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, identity, *;q=0
Cache-Control: no-cache
Connection: Keep-Alive, TE
TE: deflate, gzip, chunked, identity, trailers
");
ob_start();
echo fread($fp, 9000);
$dane2 = ob_get_contents();
$file = "wp.txt";
$fp = fopen($file, "a+");
fwrite($fp, stripslashes($dane2));
ob_end_clean();
fclose($fp);
?>
Wszystko dziala z jedym ale, czyta tylko te 9000 znakow czy bajtow whatever, jak zrobic zeby czytalo do konca?