Credit to this link

http://forums.digitalpoint.com/showthread.php?t=125309


On Sun, Feb 27, 2011 at 6:47 PM, Akshay Dave <[email protected]> wrote:

> got the problem..
>
>   for cities with space within them once has to encode the url so just
> query can be modified as
> "http://maps.google.com/maps/geo?q=".urlencode($city)."&output=xml&key=$key<http://maps.google.com/maps/geo?q=$city&output=xml&key=$key>"
> works  wonders !
>
> Thanks again!
>
> Akshay
>
>
> On Sun, Feb 27, 2011 at 3:46 PM, Akshay Dave <[email protected]> wrote:
>
>> Thanks Andrew,
>>
>>  The reason I assumed this is because of following:
>>
>>  My url is $address = "
>> http://maps.google.com/maps/geo?q=$city&output=xml&key=$key";;
>>
>>    and then when I try to do $page = file_get_contents($address);
>>
>>
>> I get following error:
>>
>>
>> *Warning*: 
>> file_get_contents(http://maps.google.com/maps/geo?q=SanFrancisco&output=xml&key=ABQIAAAAL9E_Jepzq_1Uig0zdAuDnBQIPHeGMNc8f7iS-VvunL07sOhWqRQpQ9u7A9uOcmb_VWIw6gnFcef0HQ)
>> [function.file-get-contents<http://localhost/OAuth_Moc/function.file-get-contents>]:
>> failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in *
>> demo.php* on line *231*
>> String could not be parsed as XML
>>
>>
>> Is this something a problem of php?... or in case you have come across
>> such kind of problem let me know
>>
>> Many Thanks
>> Akshay
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to