<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Datum Whois Domain Ownership lookup tool</title>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Whois Domain Ownership lookup tool" />
<meta name="keywords" content="whois, domain ownership" />
<link href="main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div align="center">
<div id="container">
<div id="header">
<a href="http://www.whois.datum-forensics.com"><img src="images/logo.png" width="363" height="100" border="0" style="border:none;" alt="" /></a>
</div>
<div id="searchContainer">
<form action="index.php" method="get">
<input type="text" name="ip" size="38" />
<input type="submit" value="Whois This" />
</form>
</div>
<div id="content">
<?php
$cmd = get_whois_cmd();
if ( isset($_GET['ip']) )
{
$ip=$_GET['ip'];
echo get_whois($cmd, $ip);
}
function get_whois_cmd()
{
if (file_exists('/usr/local/bin/whois'))
{
$cmd = '/usr/local/bin/whois';
}
elseif (file_exists('/usr/bin/whois'))
{
$cmd = '/usr/bin/whois';
}
elseif (file_exists('/bin/whois'))
{
$cmd = '/bin/whois';
}
else
{
die("<h1>Error:</h1>\n<p>Couldn't locate the 'whois' program.</p>");
}
return $cmd;
}
function get_whois($cmd, $domain)
{
if(trim($domain) !== '')
{
if (checkdnsrr($domain))
{
$result = nl2br(shell_exec(escapeshellcmd($cmd ." ". $domain)));
}
else
{
$result = '<font color="blue">Domain not registered!</font>';
}
}
else
{
$result = '<font color="blue">Error: Empty domain name.</font>';
}
return $result;
}
?>
</div>
</div>
<div id="footer">
<br />
<a href="http://www.datum-forensics.com/contact/" title="Datum">Contact Datum</a> |
<a href="./terms.php" title="Datum">Terms of Use</a>.<br />
Copyright 2012 <a href="http://www.datum-forensics.com" title="Datum">Datum</a> - All rights reserved.
</div>
</div>
</body>
</html>