Using PHP to extract data from an ATOM feed and using it reverse lookup coordinates to an actual address

StackOverflow https://stackoverflow.com/questions/2864830

  •  30-09-2019
  •  | 
  •  

문제

Basically I have a public feed: http://www.google.com/latitude/apps/badge/api?user=-1671995934285587708&type=atom

If you go to my Google Profile you can see it says: "Gareth is in 6 Seaside Gardens, Mullaloo WA 6027, Australia (1 minute ago)" google.com/profiles/Gareth.B.Hall

How can I, using PHP, display my location on a website the same way it's displayed on my Google Profile?

Thanks

도움이 되었습니까?

해결책

You can ask Google's Geocoding API for information about the location. The details are all in that link; you could use an URL like:

http://maps.google.com/maps/api/geocode/xml?latlng=-31.774891,115.735698&sensor=false

The value that you probably want would be the formatted_address of 6 Seaside Gardens, Mullaloo WA 6027, Australia.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top