Getting visitors country from their IP
- by Ali Abdulkarim Salem
i want to get visitors country via their IP..
right now I'm using this ( http://api.hostip.info/country.php?ip=...... )
here's my code
<?php
if (isset($_SERVER['HTTP_CLIENT_IP']))
{
$real_ip_adress = $_SERVER['HTTP_CLIENT_IP'];
}
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$real_ip_adress = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else…