use stream_get_contents

This commit is contained in:
j 2008-04-20 16:57:19 +02:00
parent cf8e33ec65
commit 1950acb771

View file

@ -353,8 +353,7 @@ function getUrl($url) {
$f = @fsockopen($host, 80, $errorNumber, $errorString, 60); $f = @fsockopen($host, 80, $errorNumber, $errorString, 60);
if ($f) { if ($f) {
fwrite($f, $headers); fwrite($f, $headers);
while (!feof($f)) $data = stream_get_contents($f);
$data .= fread($f, 1024);
fclose($f); fclose($f);
$data = substr($data, strpos($data, "\r\n\r\n") + 4); $data = substr($data, strpos($data, "\r\n\r\n") + 4);
} }