|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-05-18 16:21 UTC] laurent at roussanne dot com
Description:
------------
file_get_contents("http://www.php.net");
reports :
failed to open stream: Une tentative de connexion a échoué car le parti connecté
n'a pas répondu convenablement au-delà d'une certaine durée ou une connexion
établie a échoué car l'hôte de connexion n'a pas répondu.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
Works just fine. Verify your network connections or whatever you use to connect to internet. I suppose a simple: file_get_contents("http://127.0.01/"); will work just fine too for you (as long as you have 127.0.0.1 define).I worked to find a workaround all the last weekend. the solution was writing this : function win64_file_get_contents($url, $timeout=5) { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $file_contents = curl_exec($ch); curl_close($ch); if (is_bool($file_contents) && ($file_contents == FALSE)) { return FALSE; } else { return $file_contents; } } I'm sure you know this code (found on the web). Do you have a windows 2008 64 test platform ?