From 1950acb77133b55ef0e388e284660b27a733c444 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 20 Apr 2008 16:57:19 +0200 Subject: [PATCH] use stream_get_contents --- php/library.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/php/library.php b/php/library.php index dd931b4..9498a2d 100755 --- a/php/library.php +++ b/php/library.php @@ -353,8 +353,7 @@ function getUrl($url) { $f = @fsockopen($host, 80, $errorNumber, $errorString, 60); if ($f) { fwrite($f, $headers); - while (!feof($f)) - $data .= fread($f, 1024); + $data = stream_get_contents($f); fclose($f); $data = substr($data, strpos($data, "\r\n\r\n") + 4); } @@ -524,4 +523,4 @@ function crawlPath($path) { -?> \ No newline at end of file +?>