/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
include('geoip/geoipcity.inc'); include("geoip/geoipregionvars.php"); $gi = geoip_open("geoip/GeoLiteCity.dat",GEOIP_STANDARD); $record = geoip_record_by_addr($gi, getip()); $country_array = array('AZ', 'AM', 'BY', 'GE', 'KZ', 'KG', 'MD', 'RU', 'TJ', 'TY', 'TM', 'UZ', 'UA'); $client_country = $record->country_code; geoip_close($gi); { echo "Yes"; }
URL: http://www.maxmind.com/app/ip-location