From: [EMAIL PROTECTED] Operating system: Linux PHP version: 5CVS-2004-07-11 (dev) PHP Bug Type: Filesystem function related Bug description: file_get_contents returns corrupted results with remote files
Description: ------------ When using file_get_contents() on remote files, the result differs from the (correct) result using the Curl functions. Reproduce code: --------------- $ch = curl_init("http://www.php.net/"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $str1 = curl_exec($ch); curl_close($ch); $str2 = file_get_contents("http://www.php.net/"); if ($str1 != $str2) { echo "Both results differ.\n"; } else { echo "Both results are the same.\n"; } Expected result: ---------------- Output "Both results are the same." Actual result: -------------- Output "Both results differ." -- Edit bug report at http://bugs.php.net/?id=29099&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29099&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29099&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29099&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29099&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29099&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29099&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29099&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29099&r=support Expected behavior: http://bugs.php.net/fix.php?id=29099&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29099&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29099&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29099&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29099&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29099&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29099&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29099&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29099&r=float