title: proxy prob!em using simplexml_load_file in php
body: <p>could somebody help me with this issue? 
  I need to know in php latitude and longitude from an address.</p>
  
  <p>I was doing:</p>
  
  <blockquote>
    <p>$address = urlencode('my address');</p>
    
    <p>$lat_lng =
    simplexml_load_file("<a href="http://maps.google.com/maps/api/geocode/xml?address=" rel="nofollow">http://maps.google.com/maps/api/geocode/xml?address=</a>{$address}&amp;sensor=false");</p>
  </blockquote>
  
  <p>but I got this warning:</p>
  
  <blockquote>
    <p>Message: simplexml_load_file()
    [function.simplexml-load-file]:
    php_network_getaddresses: getaddrinfo
    failed: Temporary failure in name
    resolution</p>
  </blockquote>
  
  <p>I think I need to configure the proxy so I changed in this way:</p>
  
  <blockquote>
    <p>$address = urlencode('my address');</p>
    
    <p>$ch =
    curl_init("<a href="http://maps.google.com/maps/api/geocode/xml?address=" rel="nofollow">http://maps.google.com/maps/api/geocode/xml?address=</a>{$address}&amp;sensor=false");</p>
    
    <p>curl_setopt($ch,
    CURLOPT_RETURNTRANSFER, 1);</p>
    
    <p>curl_setopt($ch, CURLOPT_PROXY,
    'my_proxy);</p>
    
    <p>curl_setopt($ch, CURLOPT_PROXYPORT,
    'my+port');</p>
    
    <p>$lat_lng =
    simplexml_load_string(curl_exec($ch));</p>
    
    <p>curl_close($ch);</p>
  </blockquote>
  
  <p>It seems to be blocked when I call <code>curl_exec</code>.</p>