Hello, I need one script to know country of one IP and shows it into my webpage. Please if somebody may help me how to do, reply. Thanks.
http://ip-to-country.webhosting.info/ You can download an IP to country database here, under the download section. From that, you can match a country based on the user's IP address.
According jstep download the database and this will solve your problem. I am also same thing it is working perfectly
Are you able to put these in a database? Once they are in the database, you will want to do a query to get the selected ip address. Something like: $countryQuery = mysql_query("Select countryName From iptocountry Where inet_aton('".$_SERVER['REMOTE_ADDR']."') >= ipFrom && inet_aton('".$_SERVER['REMOTE_ADDR']."') <= ipTo"); $country = mysql_result($countryQuery,0); PHP:
This: http://www.phptricks.com/lesson.php?id=22 or this: http://www.phptricks.com/lesson.php?id=23 The lateral might be outdated. Peace,