Also test sample_geoip.php?ip=212.97.132.147&code=SE where ip and code are OPTIONAL!
To test this sample file from other locations, check out this list of web-based online proxy servers.
Free Sample PHP Code
include 'geoip.inc'; include 'callingcode.inc'; $gi = geoip_open( 'GeoIP.dat', GEOIP_STANDARD ); if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; else $ipaddress = $_SERVER['REMOTE_ADDR']; $countryname = geoip_country_name_by_addr( $gi, $ipaddress ); $countrycode = geoip_country_code_by_addr( $gi, $ipaddress ); $callingcode = getCountryCallingCode( $countrycode );
This product includes GeoLite data created by MaxMind, available from http://maxmind.com/