|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-11 23:19 UTC] curt@php.net
[2004-07-13 01:01 UTC] curt@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 15:00:01 2025 UTC |
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."