Fixed warning when processing lines with no colon.
This commit is contained in:
parent
2b3a19015b
commit
5b5085e664
1 changed files with 26 additions and 26 deletions
52
gtld.whois
52
gtld.whois
|
@ -59,49 +59,49 @@ class gtld extends Whois {
|
||||||
"INTERDOMAIN, S.A." => "interdomain"
|
"INTERDOMAIN, S.A." => "interdomain"
|
||||||
);
|
);
|
||||||
|
|
||||||
function gTLD ($data,$query) {
|
function gTLD ($data, $query) {
|
||||||
$this->Query=$query;
|
$this->Query = $query;
|
||||||
$this->SUBVERSION = sprintf("%s-%s", $query["handler"],
|
$this->SUBVERSION = sprintf("%s-%s", $query["handler"], $this->HANDLER_VERSION);
|
||||||
$this->HANDLER_VERSION);
|
$this->result["regyinfo"] = $this->ParseRegInfo($data["rawdata"]);
|
||||||
$this->result["regyinfo"]=$this->ParseRegInfo($data["rawdata"]);
|
|
||||||
if($this->HACKS["nsi_referral_loop"] &&
|
if($this->HACKS["nsi_referral_loop"] &&
|
||||||
$this->result["regyinfo"]["whois"]==
|
($this->result["regyinfo"]["whois"] == $this->HACKS["wrong_netsol_whois"])) {
|
||||||
$this->HACKS["wrong_netsol_whois"] ) {
|
$this->Query["server"] = $this->HACKS["real_netsol_whois"];
|
||||||
$this->Query["server"]=$this->HACKS["real_netsol_whois"];
|
|
||||||
} else {
|
} else {
|
||||||
$this->Query["server"]=$this->result["regyinfo"]["whois"];
|
$this->Query["server"] = $this->result["regyinfo"]["whois"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->result["rawdata"])) { $this->result["rawdata"] = array(); }
|
if (!isset($this->result["rawdata"]))
|
||||||
$this->result["rawdata"]=$this->Lookup($this->Query["string"]);
|
$this->result["rawdata"] = array();
|
||||||
|
|
||||||
$this->Query["handler"] =
|
$this->result["rawdata"] = $this->Lookup($this->Query["string"]);
|
||||||
$this->REGISTRARS[$this->result["regyinfo"]["registrar"]];
|
|
||||||
|
$this->Query["handler"] = $this->REGISTRARS[$this->result["regyinfo"]["registrar"]];
|
||||||
if(!empty($this->Query["handler"])) {
|
if(!empty($this->Query["handler"])) {
|
||||||
$this->Query["file"]=sprintf("%s.whois", $this->Query["handler"]);
|
$this->Query["file"] = sprintf("%s.whois", $this->Query["handler"]);
|
||||||
// $this->result["regrinfo"]=$this->Process($this->result["rawinfo"]);
|
// $this->result["regrinfo"] = $this->Process($this->result["rawinfo"]);
|
||||||
$this->result["regrinfo"]=$this->Process($this->result["rawdata"]);
|
$this->result["regrinfo"] = $this->Process($this->result["rawdata"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ParseRegInfo ($array) {
|
function ParseRegInfo ($arr) {
|
||||||
for($i=0,$max=count($array);$i<$max;$i++) {
|
for($i = 0, $max = count($arr); $i < $max ; $i++) {
|
||||||
reset($this->REG_FIELDS);
|
reset($this->REG_FIELDS);
|
||||||
while(list($key,$val)=each($this->REG_FIELDS)) {
|
while(list($key,$val) = each($this->REG_FIELDS)) {
|
||||||
list($f_name,$f_val)=split(":", $array[$i]);
|
if(!isset($arr[$i]) || !strpos($arr[$i], ":"))
|
||||||
if($val==trim($f_name)) {
|
continue;
|
||||||
if($key=="nameserver") {
|
list($f_name, $f_val) = split(":", $arr[$i]);
|
||||||
$ret_val[$key][]=trim($f_val);
|
if($val == trim($f_name)) {
|
||||||
|
if($key == "nameserver") {
|
||||||
|
$ret_val[$key][] = trim($f_val);
|
||||||
} else {
|
} else {
|
||||||
$ret_val[$key]=trim($f_val);
|
$ret_val[$key] = trim($f_val);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return($ret_val);
|
return($ret_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue