ID:               26877
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dinklage at dinklage dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Linux
 PHP Version:      4.3.4
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

from http://www.php.net/fread 

<?php
$handle = fopen("http://www.example.com/";, "rb");
$contents = "";
do {
   $data = fread($handle, 8192);
   if (strlen($data) == 0) {
       break;
   }
   $contents .= $data;
} while (true);
fclose($handle);
?>



Previous Comments:
------------------------------------------------------------------------

[2004-01-12 04:30:32] dinklage at dinklage dot com

Description:
------------
Using fread() with URL returns only a part of the file:

eg:
reading http://schreiners-buero.de/sbinfo.htm with
25170 Byte is only 2550 Byte

Reproduce code:
---------------
$url='http://schreiners-buero.de/sbinfo.htm';
$fp = fopen($url,'rb');
$code = fread($fp,4000000);
fclose($fp);
echo "<p>length ".strlen($code)."  </p>";
$code2=file_get_contents($url);
echo "<p>length ".strlen($code2)."  </p>";
exit;




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26877&edit=1

Reply via email to