Lesson Code: http://www.developphp.com/video/PHP/GeoPlugin-Tutorial-Get-User-Location-Information-IP-Detection
Learn to use the GeoPlugin within your PHP scripts. GeoPlugin returns an array that you can easily parse using PHP. Detecting user location automatically according to their IP address requires that we have access to a geoip database to refer to in our programs. GeoPlugin offers that to you remotely which makes the set up of GEOIP programs much simpler and faster.