News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Targeted Geolocation with Geonames
December 13, 2011 @ 12:10:02

New on PHPMaster.com there's a tutorial from Lukas White about targeting users using geolocation based on the Geonames web service and a latitude/longitude. His example makes a call to find the closest "place" to the given coordinates.

Location-aware applications rely on being able to locate where you are, and this is what geolocation is all about. After all, once the application knows your location, it can go on to find the nearest store, guide you through the appropriate route to a destination, or target relevant advertisements to you. Geolocation, then, is simply the mechanism for identifying your geographical location.

He mentions two challenges associated with geolocation - finding where someone is and describing the location. With Geonames, he shows how to call the service's "findNearbyPlaceName" method to find the closest "place" to a given latitude/longitude combination. Included is a bit of sample PHP to connect to the service and Javascript to request the user's current location.

0 comments voice your opinion now!
geolocation tutorial geonames webservice json location


blog comments powered by Disqus

Similar Posts

YouTube.com: Installing Zend Server on Linux in 4 minutes and 37 seconds

Jani Hartikainen's Blog: Zend_Acl part 1: Misconceptions and simple ACLs

Jim Plush\'s Blog: The Event Driven Mobile Application on Minimo

Attila Szabo's Blog: Send SMS messages from your website through smsBug gateway

Aleksey Martynov's Blog: Getting started with lexa-tools: Blog in 15 Minutes


Community Events





Don't see your event here?
Let us know!


introduction podcast series code symfony wordpress language api list unittest configure library release bugfix laravel interview community developer application install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework