use stream_get_contents
This commit is contained in:
parent
cf8e33ec65
commit
1950acb771
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue