title: curl: (56) Failure when receiving data from the peer while accessing http://maps.google.com/maps/api/geocode/xml
body: <p>I am facing problem while accessing <a href="http://maps.google.com/maps/api/geocode/xml" rel="nofollow">http://maps.google.com/maps/api/geocode/xml</a> through code (simplexml_load_file). Its not working from putty console also. </p>
  
  <p>Here are the alternatives i used:</p>
  
  <p><strong>Option1 ></strong> </p>
  
  <p>$url = 'Above URL?adress=XXXAddress HereXXX';
  $xml = simplexml_load_file($url);</p>
  
  <p>Error:Warning: simplexml_load_file(above URL?address=XXXAddress HereXXX): failed to open stream: Connection timed out in /data/mgr_3.2.x_5/www/manager/support_scripts/geocode.php on line 5</p>
  
  <p>Warning: simplexml_load_file(): I/O warning : failed to load external entity "Above URL?address=XXXAddress HereXXX" in /data/mgr_3.2.x_5/www/manager/support_scripts/geocode.php on line 5</p>
  
  <p>bool(false)</p>
  
  <p><strong>Option 2 ></strong></p>
  
  <p>Tried it from Server:
  ]# curl --data "XXXXXXXXXXXXXXXXX" --verbose <a href="http://maps.google.com/maps/api/geocode/" rel="nofollow">http://maps.google.com/maps/api/geocode/</a></p>
  
  <p>Error:
  * Closing connection #0
  * Failure when receiving data from the peer
  curl: (56) Failure when receiving data from the peer</p>
  
  <p><strong>Curl Details:</strong></p>
  
  <p>rpm -qa|grep curl</p>
  
  <p>python-pycurl-7.19.0-8.el6.x86_64</p>
  
  <p>curl-7.19.7-36.el6_4.x86_64</p>
  
  <p>libcurl-7.19.7-36.el6_4.x86_64</p>
  
  <p>Recently my code migrated to another server and latest PHP version (5.4.14).</p>
  
  <p><strong>Tried all solutions given on various sites. I am badly stucked. Please Help out.</strong> </p>
  
  <p>Thanks in advance</p>
  
  <p>Sandip</p>