if(trim(@$_REQUEST['q']) && checkImage())
{
$q = $_REQUEST['q'];
if(preg_match("#\\d+\\.\\d+.\\.\\d+.\\.\\d+.#",$q))
{
$res = gethostbyaddr($q);
}
else
{
$res = gethostbyname($q);
}
echo "
The Host/IP Address you provided resolves to:
";
echo "$res
";
}
?>