@@ 533-545 (lines=13) @@ | ||
530 | * @param $url |
|
531 | * @return bool|string |
|
532 | */ |
|
533 | public static function planetFetchFopen($url) |
|
534 | { |
|
535 | if (!$fp = @fopen($url, 'r')) { |
|
536 | return false; |
|
537 | } |
|
538 | $data = ''; |
|
539 | while (!feof($fp)) { |
|
540 | $data .= fgets($fp, 1024); |
|
541 | } |
|
542 | fclose($fp); |
|
543 | ||
544 | return $data; |
|
545 | } |
|
546 | ||
547 | /** |
|
548 | * @param $haystack |
@@ 522-534 (lines=13) @@ | ||
519 | * @param $url |
|
520 | * @return bool|string |
|
521 | */ |
|
522 | function planet_fetch_fopen($url) |
|
523 | { |
|
524 | if (!$fp = @fopen($url, 'r')) { |
|
525 | return false; |
|
526 | } |
|
527 | $data = ''; |
|
528 | while (!feof($fp)) { |
|
529 | $data .= fgets($fp, 1024); |
|
530 | } |
|
531 | fclose($fp); |
|
532 | ||
533 | return $data; |
|
534 | } |
|
535 | ||
536 | /** |
|
537 | * @param $haystack |