| |
<%
if (isset($query)) {
chdir("whois_3.0.5");
include("main.whois");
$whois = new Whois($query);
$result = $whois->Lookup();
// echo ""; print_r($result); echo " ";
echo "Domain Search Results for $query : Confirm results below with your registrar. Summary information will appear first followed by all the registration information returned by your registrar.
";
if(isSet($whois->Query["errstr"]) && !isset($result["regyinfo"]) ) {
echo "Query may have errors: ".implode($whois->Query["errstr"])." ";
}
if($output=="object") {
include("whois_3.0.5/utils.whois");
$utils = new utils;
$utils->showObject($result);
} else {
$hasExpire=0; // did it come back in the search results structure
if (isset($result["regyinfo"])) {
$stuff = $result["regyinfo"];
echo "Registrar is: ".$stuff['registrar'].
" (".$stuff['whois'].")"."\n";
}
if (isset($result["regrinfo"])) {
$stuff = $result['regrinfo']['domain'];
echo "Name servers: ".implode($stuff["nserver"], " , ")."\n";
if ($stuff["expires"]) {
$hasExpire=1;
echo "Expires: ".$stuff["expires"]." \n";
}
}
// check to see if we can find an expiration date in the raw data
$num = count($result["rawdata"]);
$match = 0; $i = 0;
foreach ($result["rawdata"] as $line) {
$i++;
if ( strstr($line, "Software Workshop, Inc. may be contacted for domain login")) {
$weManage = 1;
}
if ( (!$hasExpire) &&
(strstr($line, "expires") || strstr($line, "Expiration") || strstr($line, "Delegated") || strstr($line, "Renewal") || strstr($line, "Expires")) ) {
$match = $line;
echo "Expiration info: $match\n";
//break;
}
} // end for - all raw lines
if ($weManage=="1") {
echo "\nIt appears $query is registered with us. \nClick here to manage your domain registration information. \n";
}
echo " ";
if (!empty($result["rawdata"])) {
echo implode($result["rawdata"],"\n");
} else {
echo " No Match";
}
}
}
%>
|