Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Geocoding API giving different results to my server and my web browser
    text
    copied!<p>I'm using the Google Geocoding API to get the lat/lng co-ordinates for different location searches on my site. The problem is that for areas of London (it might not be restricted to just London that's just where most of our user base is) such as "Waterloo" the geocoding api is returning different results to my server from when i put the url directly in my browser. This is the url that is generated for waterloo:</p> <p><a href="http://maps.googleapis.com/maps/api/geocode/xml?address=waterloo,%20london,%20england&amp;bounds=48.8,-11.2|60.9,1.9&amp;sensor=false&amp;region=uk" rel="nofollow">http://maps.googleapis.com/maps/api/geocode/xml?address=waterloo,%20london,%20england&amp;bounds=48.8,-11.2|60.9,1.9&amp;sensor=false&amp;region=uk</a></p> <p>If i paste this into my browser I get the correct area of Waterloo ("Waterloo, London Borough of Lambeth, London SE1, UK"). However, when my server retrieves the results from this url it gets the address "2C Waterloo Rd, London, Greater London NW2 7UA, UK" which is miles away from Waterloo. (It is only returning a single result too.)</p> <p>My server is based in the UK and doing an GeoIP on the IP confirms this. Why would Google return different results to my server? </p> <p>(BTW my server is using PHP5 simplexml_load_file() to retrieve the results)</p> <p>** I don't understand why this question has been marked as a duplicate of another. The question this is a supposed duplicate of does not answer my question in the slightest, my question has nothing to do with businesses (only postal regions) and does not explain why my server is being treated differently to my PC.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload