$ipaddr = "$ip";
$field = "City";
$data = exec("whois -h whois.arin.net \"+ $ipaddr\"",$ret);
foreach($ret as $line)
{
$search = strstr($line,$field);
if($search != "") {
$searchx = explode(":",$search);
echo trim($searchx[1]);
}
}
thats what i have right now. but i need it to get into mydatabase and look up the IP location of a specific user to see if its the same as the address they registered with on the site.
any tips/help?