From 09ce461b84a63396a691204f0af054983fc2c810 Mon Sep 17 00:00:00 2001 From: rossigee Date: Thu, 10 Oct 2002 12:43:05 +0000 Subject: [PATCH] Fixed detection of non-existant domains. Added status (active/inactive/detagged) and corrected error for detagged domains. Adam Greedus/David Saez Padros. --- uknic.whois | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/uknic.whois b/uknic.whois index a232487..8235d94 100644 --- a/uknic.whois +++ b/uknic.whois @@ -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 */ +/* uknic.whois 1.2 David Saez Padros */ /* 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="";