<? function resolve_host($ip) { $host = gethostbyaddr($ip); if ($host == $ip) { return 0; } return $host; }