egeoip EGeoIp Extension uses geoPlugin free webservice to locate IP geo information

  1. What is geoPlugin?
  2. Requirements
  3. Usage
  4. Note
  5. Resources
  6. Change Log
  7. version 1.0

This extension allows you to easily integrate the geoPlugin webservice into your Yii applications.

To download and/or contribute to the extension, please use the github repository.

What is geoPlugin?

geoPlugin offers you, the webmaster, the ability to easily geo-localize your visitor down to the city they are in, know what currency they use and the up-to-date currency exchange rate of their currency versus yours.


Developed with Yii 1.1.6


Unpack the contents of the extension to your protected/extensions directory. Once you do that, the following is an example on how to use it:


$geoIp = new EGeoIP();

$geoIp->locate(''); // use your IP

echo 'Information regarding IP: <b>'.$geoIp->ip.'</b><br/>';
echo 'City: '.$geoIp->city.'<br>';
echo 'Region: '.$geoIp->region.'<br>';
echo 'Area Code: '.$geoIp->areaCode.'<br>';
echo 'DMA: '.$geoIp->dma.'<br>';
echo 'Country Code: '.$geoIp->countryCode.'<br>';
echo 'Country Name: '.$geoIp->countryName.'<br>';
echo 'Continent Code: '.$geoIp->continentCode.'<br>';
echo 'Latitude: '.$geoIp->latitude.'<br>';
echo 'Longitude: '.$geoIp->longitude.'<br>';
echo 'Currency Symbol: '.$geoIp->currencySymbol.'<br>';
echo 'Currency Code: '.$geoIp->currencyCode.'<br>';
echo 'Currency Converter: '.$geoIp->currencyConverter.'<br/>';

echo 'Converting $10.00 to '.$geoIp->currencyCode.': <b>'.$geoIp->currencyConvert(10).'</b><br/>';


Please make use of the forum post to report errors, requests, and suggestions. Let comments on this extension for coding hints.


Change Log

version 1.0

  • Initial Public Release
16 1
1 688 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Web Service
Developed by: Antonio Ramirez
Created on: Feb 21, 2011
Last updated: 6 years ago


show all

Related Extensions