From ce0da85a441954aea763ced2228c18ffe5f71575 Mon Sep 17 00:00:00 2001 From: sparc Date: Thu, 22 Apr 2004 18:27:47 +0000 Subject: [PATCH] added feature request 759788 --- gtld.whois | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/gtld.whois b/gtld.whois index 91220a1..72c5b0d 100644 --- a/gtld.whois +++ b/gtld.whois @@ -55,6 +55,7 @@ class gtld extends Whois { var $REGISTRARS = array( "ALABANZA, INC." => "bulkregistercom", "BULKREGISTER.COM, INC." => "bulkregistercom", + "BULKREGISTER, LLC." => "bulkregistercom", "CORE INTERNET COUNCIL OF REGISTRARS" => "core", "DOTSTER, INC." => "dotster", "ENOM, INC." => "enom", @@ -101,15 +102,37 @@ class gtld extends Whois { @$this->Query["handler"] = $this->REGISTRARS[$this->result["regyinfo"]["registrar"]]; + $this->result["regrinfo"]["registered"] = $this->result["registered"]; + unset($this->result["registered"]); + if (!empty($this->Query["handler"])) { $this->Query["file"] = sprintf("%s.whois", $this->Query["handler"]); - $domaindata = $this->result["regrinfo"]["domain"]; $regrinfo = $this->Process($this->result["rawdata"]); - $this->result["regrinfo"] = $regrinfo; - if (isset($regrinfo["domain"])) - $this->result["regrinfo"]["domain"] = array_merge($domaindata,$regrinfo["domain"]); + $this->result["regrinfo"] = merge_results($this->result["regrinfo"],$regrinfo); } } } +function merge_results ( $a1, $a2 ) +{ + +reset($a2); + +while (list($key, $val) = each($a2)) { + if (isset($a1[$key])) { + if (is_array($val)) + $a1[$key]=merge_results($a1[$key],$val); + else { + $val=trim($val); + if ($val!='') + $a1[$key]=$val; + } + } + else + $a1[$key]=$val; + } + +return $a1; +} + ?>