Fixed detection of non-existant domains. Added status (active/inactive/detagged) and corrected error for detagged domains. Adam Greedus/David Saez Padros.

This commit is contained in:
rossigee 2002-10-10 12:43:05 +00:00
parent f1c8f8b8d9
commit 09ce461b84

View file

@ -25,8 +25,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* uknic.whois 1.1 David Saez Padros <david@ols.es> */
/* uknic.whois 1.2 David Saez Padros <david@ols.es> */
/* Fixed detection of non-existant domains */
/* 8/1/2002 Added status (active/inactive/detagged) and corrected error for detagged domains */
/* (like blue.co.uk) thanx to Adam Greedus */
if(!defined("__UKNIC_HANDLER__")) define("__UKNIC_HANDLER__",1);
@ -82,12 +84,18 @@ while (list($key, $val)=each($data_str["rawdata"]))
}
}
if (!empty($r["regrinfo"]["ns"]))
if (!empty($r["regrinfo"]["domain"]))
{ $r["regyinfo"]=array( "whois"=>"whois.nic.uk","referrer"=>"www.nic.uk" );
$r["regyinfo"]["nameserver"]=$r["regrinfo"]["ns"];
$r["regyinfo"]["domain"]=$r["regrinfo"]["domain"];
$r["regyinfo"]["registrar"]=$r["regrinfo"]["registrar"];
$r["regyinfo"]["updated"]=$r["regrinfo"]["updated"];
if (!empty($r["regrinfo"]["ns"]))
$r["regrinfo"]["status"]="active";
else { if ($r["regrinfo"]["registrar"]=="DETAGGED")
$r["regrinfo"]["status"]="detagged";
else $r["regrinfo"]["status"]="inactive";
}
}
else $r="";