title: converting address into geocoordinates
body: <p>i am trying to convert address into geocoordiantes.when i call this function and print the latlong values system give me the following error.</p>
  
  <blockquote>
    <p>Warning: file_get_contents(<a href="http://maps.googleapis.com/maps/api/geocode/json?latlng=Raiwind" rel="nofollow">http://maps.googleapis.com/maps/api/geocode/json?latlng=Raiwind</a> Road,Lahore,Pakistan,74.2306&amp;sensor=false) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in C:\wamp\www\temp\yy.php on line 137</p>
  </blockquote>
  
  <p>the code is given below:kindly resolve it</p>
  
  <pre><code>      function getlatlong($address)  
            {   
        $Address = urlencode($address);
        $request_url = "http://maps.googleapis.com/maps/api/geocode/xml?address=".$Address."&amp;sensor=true";
        $xml = simplexml_load_file($request_url) or die("url not loading");
         $status = $xml-&gt;status;
         if ($status=="OK") {
           $Lat = $xml-&gt;result-&gt;geometry-&gt;location-&gt;lat;
          $Lon = $xml-&gt;result-&gt;geometry-&gt;location-&gt;lng;
           $LatLng = "$Lat,$Lon";
            }
             return $LatLng;
                }
              $coord=getlatlong($source1);
               print $coord;
  </code></pre>