From 5fd219e0243e71ec12d3a9ca38171627258ec731 Mon Sep 17 00:00:00 2001 From: Troy Siedsma Date: Thu, 10 Dec 2015 14:49:09 -0600 Subject: [PATCH 01/21] Fixed .id whois servers Fixed whois server for .go.id and .mil.id also added support for .web.id --- src/Phois/Whois/whois.servers.json | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index f270d3a..e479b21 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -1384,8 +1384,8 @@ "% no matching objects found" ], "go.id": [ - "whois.idnic.net.id", - "Not found" + "whois.pandi.or.id", + "DOMAIN NOT FOUND" ], "go.jp": [ "whois.nic.ad.jp", @@ -2148,8 +2148,8 @@ "DOMINIO NO REGISTRADO" ], "mil.id": [ - "whois.idnic.net.id", - "Not found" + "whois.pandi.or.id", + "DOMAIN NOT FOUND" ], "mil.pl": [ "whois.dns.pl", @@ -3547,6 +3547,10 @@ "whois.donuts.co", "Domain not found." ], + "web.id": [ + "whois.pandi.or.id", + "DOMAIN NOT FOUND" + ], "web.ve": [ "whois.nic.ve", "No match for" @@ -3907,4 +3911,4 @@ "whois.ksregistry.net", "not found..." ] -} \ No newline at end of file +} From 00090cfc47b0c38f0b3e0c473d64583d4aff0af4 Mon Sep 17 00:00:00 2001 From: Troy Siedsma Date: Thu, 10 Dec 2015 20:34:41 -0600 Subject: [PATCH 02/21] Updated unitedtld.com to rightside.co --- src/Phois/Whois/whois.servers.json | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index e479b21..428f971 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -68,7 +68,7 @@ "Domain not found." ], "actor": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "ad": [ @@ -120,7 +120,7 @@ "No information available" ], "airforce": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "allfinanz": [ @@ -216,7 +216,7 @@ "No Data Found" ], "auction": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "audio": [ @@ -764,7 +764,7 @@ "Domain not found" ], "consulting": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "contractors": [ @@ -832,7 +832,7 @@ "Domain not found." ], "dance": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "dating": [ @@ -868,7 +868,7 @@ "Domain not found." ], "democrat": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "dental": [ @@ -1232,7 +1232,7 @@ "Domain not found." ], "forsale": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "fot.br": [ @@ -1268,7 +1268,7 @@ "Domain not found." ], "futbol": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found" ], "g12.br": [ @@ -1556,7 +1556,7 @@ "Domain not found." ], "haus": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "hb.cn": [ @@ -1688,7 +1688,7 @@ "Domain not found." ], "immobilien": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "in": [ @@ -1840,7 +1840,7 @@ "No match found" ], "kaufen": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "kddi": [ @@ -2192,7 +2192,7 @@ "NOT FOUND" ], "moda": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "monash": [ @@ -2808,7 +2808,7 @@ "no match" ], "pub": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "pw": [ @@ -2908,7 +2908,7 @@ "Domain not found." ], "reviews": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "rich": [ @@ -2928,7 +2928,7 @@ "No entries found" ], "rocks": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "rodeo": [ @@ -3112,7 +3112,7 @@ "No entries found" ], "social": [ - "whois.unitedtld.com", + "whois.rightside.co", "Domain not found." ], "software": [ From 6a316249273e00dd44254cac3bfc53bff42de73e Mon Sep 17 00:00:00 2001 From: igorminor Date: Wed, 24 Feb 2016 17:35:37 +0100 Subject: [PATCH 03/21] not_found_string as array for multiple options, added new prefix "negation" for check isAvailable, added new rule for SK domain into whois servers JSON --- examples/usage-example.php | 3 ++ src/Phois/Whois/Whois.php | 65 ++++++++++++++++++------------ src/Phois/Whois/whois.servers.json | 3 +- 3 files changed, 44 insertions(+), 27 deletions(-) diff --git a/examples/usage-example.php b/examples/usage-example.php index e42a588..b2c1fc1 100644 --- a/examples/usage-example.php +++ b/examples/usage-example.php @@ -1,6 +1,9 @@ subDomain; } - public function isAvailable() - { - $whois_string = $this->info(); - $not_found_string = ''; - if (isset($this->servers[$this->TLDs][1])) { - $not_found_string = $this->servers[$this->TLDs][1]; - } - - $whois_string2 = @preg_replace('/' . $this->domain . '/', '', $whois_string); - $whois_string = @preg_replace("/\s+/", ' ', $whois_string); - - $array = explode (":", $not_found_string); - if ($array[0] == "MAXCHARS") { - if (strlen($whois_string2) <= $array[1]) { - return true; - } else { - return false; - } - } else { - if (preg_match("/" . $not_found_string . "/i", $whois_string)) { - return true; - } else { - return false; - } - } - } + public function isAvailable() + { + $whois_string = $this->info(); + $not_found_string = ''; + if (isset($this->servers[$this->TLDs][1])) { + $not_found_strings = array_slice($this->servers[$this->TLDs], 1); + } + + $whois_string2 = @preg_replace('/' . $this->domain . '/', '', $whois_string); + $whois_string = @preg_replace("/\s+/", ' ', $whois_string); + + $return = true; + + if (is_array($not_found_strings)) { + foreach ($not_found_strings as $not_found_string) { + $array = explode (":", $not_found_string); + if ($array[0] == "MAXCHARS") { + if (strlen($whois_string2) <= $array[1]) { + $return &= true; + } else { + $return &= false; + } + } else if ($array[0] == "NEGATION") { + if (preg_match("/" . $array[1] . "/i", $whois_string)) { + $return &= false; + } else { + $return &= true; + } + } else { + if (preg_match("/" . $not_found_string . "/i", $whois_string)) { + $return &= true; + } else { + $return &= false; + } + } + } + } + return $return; + } public function isValid() { diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index f270d3a..6520afe 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -3077,7 +3077,8 @@ ], "sk": [ "whois.sk-nic.sk", - "Not found" + "Not found", + "NEGATION:The Domain cannot be registered" ], "sklep.pl": [ "whois.dns.pl", From 1afa0642c67f22fd98fc419450f30c90995c9d10 Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Wed, 9 Mar 2016 08:41:08 +0100 Subject: [PATCH 04/21] Replace whois.nic.ad.jp with whois.jprs.jp --- src/Phois/Whois/whois.servers.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index f270d3a..8678313 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -32,7 +32,7 @@ "NOT FOUND" ], "ac.jp": [ - "whois.nic.ad.jp", + "whois.jprs.jp", "No match!!" ], "ac.ke": [ @@ -592,7 +592,7 @@ "NOT FOUND" ], "co.jp": [ - "whois.nic.ad.jp", + "whois.jprs.jp", "No match!!" ], "co.ke": [ @@ -1388,7 +1388,7 @@ "Not found" ], "go.jp": [ - "whois.nic.ad.jp", + "whois.jprs.jp", "No match!!" ], "go.kr": [ @@ -2268,7 +2268,7 @@ "No entries found" ], "ne.jp": [ - "whois.nic.ad.jp", + "whois.jprs.jp", "No match!!" ], "ne.kr": [ @@ -2524,7 +2524,7 @@ "nothing found" ], "or.jp": [ - "whois.nic.ad.jp", + "whois.jprs.jp", "No match!!" ], "or.kr": [ From 1c2d2c5d39e36d56b1beaedf8c265a4a10a3f4c3 Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Thu, 10 Mar 2016 08:24:05 +0100 Subject: [PATCH 05/21] Remove wrong mappings for whois.co.za --- src/Phois/Whois/whois.servers.json | 44 ------------------------------ 1 file changed, 44 deletions(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index 8678313..4d484e7 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -55,10 +55,6 @@ "whois.ja.net", "Sorry - no" ], - "ac.za": [ - "whois.co.za", - "No information available" - ], "academy": [ "whois.donuts.co", "Domain not found" @@ -131,10 +127,6 @@ "whois-alsace.nic.fr", "Requested Domain cannot be found" ], - "alt.za": [ - "whois.co.za", - "No information available" - ], "am": [ "whois.nic.am", "No match" @@ -1019,10 +1011,6 @@ "whois.metu.edu.tr", "No match found" ], - "edu.za": [ - "whois.co.za", - "No information available" - ], "education": [ "whois.donuts.co", "Domain not found" @@ -1475,10 +1463,6 @@ "whois.metu.edu.tr", "No match found" ], - "gov.za": [ - "whois.co.za", - "No information available" - ], "gq": [ "whois.dominio.gq", "Invalid query or domain name not known" @@ -2159,10 +2143,6 @@ "whois.metu.edu.tr", "No match found" ], - "mil.za": [ - "whois.co.za", - "No information available" - ], "mini": [ "whois.ksregistry.net", "not found..." @@ -2375,10 +2355,6 @@ "whois.nic.ve", "No match for" ], - "net.za": [ - "whois.co.za", - "No information available" - ], "network": [ "whois.donuts.co", "Domain not found." @@ -2407,10 +2383,6 @@ "http:\/\/www2.dot.ph\/WhoIs.asp?Domain=", "is still available" ], - "ngo.za": [ - "whois.co.za", - "No information available" - ], "nico": [ "whois.nic.nico", "DOMAIN NOT FOUND" @@ -2459,10 +2431,6 @@ "whois.rotld.ro", "No entries found" ], - "nom.za": [ - "whois.co.za", - "No information available" - ], "nra": [ "whois.afilias-srs.net", "NOT FOUND" @@ -3011,10 +2979,6 @@ "whois.srs.net.nz", "220 Available" ], - "school.za": [ - "whois.co.za", - "No information available" - ], "schule": [ "whois.donuts.co", "Domain not found." @@ -3303,10 +3267,6 @@ "whois.rotld.ro", "No entries found" ], - "tm.za": [ - "whois.co.za", - "No information available" - ], "tmp.br": [ "whois.nic.br", "No match for" @@ -3551,10 +3511,6 @@ "whois.nic.ve", "No match for" ], - "web.za": [ - "whois.co.za", - "No information available" - ], "website": [ "whois.nic.website", "DOMAIN NOT FOUND" From fc46fb99e65d2cb790bcc9da8f77ecbb1f8db939 Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Thu, 10 Mar 2016 08:46:57 +0100 Subject: [PATCH 06/21] Fix pattern for co.ac --- src/Phois/Whois/whois.servers.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index 4d484e7..cf200ff 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -569,7 +569,7 @@ ], "co.ac": [ "whois.nic.ac", - "Available" + "not registered" ], "co.at": [ "whois.nic.at", From 6d1a620ccb1ed78c1d674ff6b9163c0b6e80e90f Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Thu, 10 Mar 2016 08:51:50 +0100 Subject: [PATCH 07/21] Fix pattern for com.ua --- src/Phois/Whois/whois.servers.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index cf200ff..f9a7499 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -729,7 +729,7 @@ ], "com.ua": [ "whois.net.ua", - "No entries found" + "no object found" ], "com.ve": [ "whois.nic.ve", From 85b7965ced4ce03cb96c9307d33f3815ff67079d Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Thu, 10 Mar 2016 08:54:04 +0100 Subject: [PATCH 08/21] Remove wrong mapping for gov.mx --- src/Phois/Whois/whois.servers.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index f9a7499..3adb43b 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -1447,10 +1447,6 @@ "whois.nic.mm", "No domains matched" ], - "gov.mx": [ - "whois.nic.mx", - "Object_Not_Found" - ], "gov.my": [ "whois.mynic.net.my", "does not exist" From 8d33c0b72468033267f275ddcbbd40ad5c39b3d7 Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Thu, 10 Mar 2016 13:10:21 +0100 Subject: [PATCH 09/21] Remove wrong mapping for mil.tr --- src/Phois/Whois/whois.servers.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index 3adb43b..291173c 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -2135,10 +2135,6 @@ "whois.dns.pl", "No information available" ], - "mil.tr": [ - "whois.metu.edu.tr", - "No match found" - ], "mini": [ "whois.ksregistry.net", "not found..." From 02bbd7db27cd92f76b2c698469c3240f74da136b Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Thu, 10 Mar 2016 13:16:03 +0100 Subject: [PATCH 10/21] Remove wrong mapping for edu.cn --- src/Phois/Whois/whois.servers.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index 291173c..a966086 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -963,10 +963,6 @@ "whois.aunic.net", "No Data Found" ], - "edu.cn": [ - "whois.cnnic.net.cn", - "no matching record" - ], "edu.gr": [ "http:\/\/grwhois.ics.forth.gr:800\/plainwhois\/plainWhois?domainName=", "not exist" From 672c5cc101e8ddad81e7b0a24daa09596271147c Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Thu, 10 Mar 2016 13:18:08 +0100 Subject: [PATCH 11/21] Fix pattern for whois.net.ua --- src/Phois/Whois/whois.servers.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index a966086..5926bf5 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -917,7 +917,7 @@ ], "dn.ua": [ "whois.net.ua", - "No entries found" + "No match record found" ], "docs": [ "domain-registry-whois.l.google.com", @@ -1833,7 +1833,7 @@ ], "kh.ua": [ "whois.net.ua", - "No entries found" + "No match record found" ], "ki": [ "whois.nic.ki", @@ -1841,7 +1841,7 @@ ], "kiev.ua": [ "whois.net.ua", - "No entries found" + "no object found" ], "kim": [ "whois.afilias.net", @@ -1929,7 +1929,7 @@ ], "lg.ua": [ "whois.net.ua", - "No entries found" + "No match record found" ], "lgbt": [ "whois.afilias.net", @@ -2005,7 +2005,7 @@ ], "lviv.ua": [ "whois.net.ua", - "No entries found" + "no object found" ], "ly": [ "whois.nic.ly", @@ -2333,7 +2333,7 @@ ], "net.ua": [ "whois.net.ua", - "No entries found" + "no object found" ], "net.uk": [ "whois.nic.uk", From 46eb930c62b0c3dc1a1f05b6f78cdbe7fbbd576d Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Thu, 10 Mar 2016 13:35:44 +0100 Subject: [PATCH 12/21] Fix pattern for ac.ke --- src/Phois/Whois/whois.servers.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index 5926bf5..330ceb5 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -37,7 +37,7 @@ ], "ac.ke": [ "whois.kenic.or.ke", - "Not Registered" + "No Object Found" ], "ac.kr": [ "whois.nic.or.kr", From 0251b827c60c24f5d0ef414f297f22ea2dbb67f3 Mon Sep 17 00:00:00 2001 From: Markus Malkusch Date: Thu, 10 Mar 2016 13:41:21 +0100 Subject: [PATCH 13/21] Fix pattern for whois.nic.or.kr --- src/Phois/Whois/whois.servers.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index 330ceb5..6e63470 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -41,7 +41,7 @@ ], "ac.kr": [ "whois.nic.or.kr", - "is not registered" + "domain was not found" ], "ac.nz": [ "whois.srs.net.nz", @@ -593,7 +593,7 @@ ], "co.kr": [ "whois.nic.or.kr", - "is not registered" + "domain was not found" ], "co.nz": [ "whois.srs.net.nz", @@ -1377,7 +1377,7 @@ ], "go.kr": [ "whois.nic.or.kr", - "is not registered" + "domain was not found" ], "go.th": [ "whois.thnic.net", @@ -2241,7 +2241,7 @@ ], "ne.kr": [ "whois.nic.or.kr", - "is not registered" + "domain was not found" ], "net": [ "whois.crsnic.net", @@ -2393,7 +2393,7 @@ ], "nm.kr": [ "whois.nic.or.kr", - "is not registered" + "domain was not found" ], "no": [ "whois.norid.no", @@ -2485,7 +2485,7 @@ ], "or.kr": [ "whois.nic.or.kr", - "is not registered" + "domain was not found" ], "or.th": [ "whois.thnic.net", @@ -2793,7 +2793,7 @@ ], "re.kr": [ "whois.nic.or.kr", - "is not registered" + "domain was not found" ], "realestate.pl": [ "whois.dns.pl", From 3b10f3c3d36108493e43a85eae7b6876d3507138 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 18 Mar 2016 17:31:06 +0300 Subject: [PATCH 14/21] Typo in comment --- src/Phois/Whois/Whois.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phois/Whois/Whois.php b/src/Phois/Whois/Whois.php index 739de3c..1cc7842 100644 --- a/src/Phois/Whois/Whois.php +++ b/src/Phois/Whois/Whois.php @@ -39,7 +39,7 @@ public function info() // If TLDs have been found if ($whois_server != '') { - // if whois server serve replay over HTTP protocol instead of WHOIS protocol + // if whois server serve reply over HTTP protocol instead of WHOIS protocol if (preg_match("/^https?:\/\//i", $whois_server)) { // curl session to get whois reposnse From 413c3615aea4456c36467ac2454550f650a870f3 Mon Sep 17 00:00:00 2001 From: Marcelo Diniz Date: Wed, 23 Mar 2016 23:10:06 -0300 Subject: [PATCH 15/21] Update whois.servers.json --- src/Phois/Whois/whois.servers.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index f270d3a..6bae80d 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -963,6 +963,10 @@ "whois.nic.br", "No match for" ], + "eco.br": [ + "whois.nic.br", + "No match for" + ], "edu": [ "whois.internic.net", "No match for" From 51a4f0b5175e824b9c4c3c2431bec3bfe5046c9c Mon Sep 17 00:00:00 2001 From: Oleh Kukil Date: Tue, 12 Apr 2016 04:25:47 +0300 Subject: [PATCH 16/21] Proxy for cURl --- src/Phois/Whois/Whois.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Phois/Whois/Whois.php b/src/Phois/Whois/Whois.php index 739de3c..713e7b8 100644 --- a/src/Phois/Whois/Whois.php +++ b/src/Phois/Whois/Whois.php @@ -15,7 +15,7 @@ class Whois /** * @param string $domain full domain name (without trailing dot) */ - public function __construct($domain) + public function __construct($domain, $proxy = false) { $this->domain = $domain; // check $domain syntax and split full domain name on subdomain and TLDs @@ -25,6 +25,9 @@ public function __construct($domain) ) { $this->subDomain = $matches[1]; $this->TLDs = $matches[2]; + if ($proxy) { + $this->proxy = $proxy; + } } else throw new \InvalidArgumentException("Invalid $domain syntax"); // setup whois servers array from json file @@ -52,6 +55,11 @@ public function info() curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + if ($proxy) { + curl_setopt($ch, CURLOPT_PROXY, $proxy['ip']); + curl_setopt($ch, CURLOPT_PROXYPORT, $proxy['port']); + } + $data = curl_exec($ch); if (curl_error($ch)) { From 99410413607dbd9de760cc2bde0191131cc44e99 Mon Sep 17 00:00:00 2001 From: igormino Date: Thu, 21 Apr 2016 21:34:43 +0200 Subject: [PATCH 17/21] fixed match pattern for co.uk --- src/Phois/Whois/whois.servers.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phois/Whois/whois.servers.json b/src/Phois/Whois/whois.servers.json index 5802989..d1c36c3 100644 --- a/src/Phois/Whois/whois.servers.json +++ b/src/Phois/Whois/whois.servers.json @@ -609,7 +609,7 @@ ], "co.uk": [ "whois.nic.uk", - "No match" + "No whois information found" ], "co.ve": [ "whois.nic.ve", From 307babacb41823bc06983d85cabc72ccd1c75044 Mon Sep 17 00:00:00 2001 From: igormino Date: Thu, 10 Nov 2016 18:45:04 +0100 Subject: [PATCH 18/21] added method of check whether server for TLD is defined --- src/Phois/Whois/Whois.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Phois/Whois/Whois.php b/src/Phois/Whois/Whois.php index c2bc579..a1923d1 100644 --- a/src/Phois/Whois/Whois.php +++ b/src/Phois/Whois/Whois.php @@ -219,4 +219,9 @@ public function isValid() return false; } + + public function isServerDefined() { + return isset($this->servers[$this->TLDs]); + } + } From 57622aa321f6319debf02049fda5b33663941f7f Mon Sep 17 00:00:00 2001 From: "Ing. Igor Mino" Date: Tue, 31 Jul 2018 15:09:00 +0200 Subject: [PATCH 19/21] added check for exist WHOIS server --- src/Phois/Whois/Whois.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Phois/Whois/Whois.php b/src/Phois/Whois/Whois.php index a1923d1..c3fdab7 100644 --- a/src/Phois/Whois/Whois.php +++ b/src/Phois/Whois/Whois.php @@ -71,6 +71,10 @@ public function info() } else { + // check whois server exist + if (gethostbyname($whois_server) == $whois_server) { + return "Whois server not exist error!"; + } // Getting whois information $fp = fsockopen($whois_server, 43); if (!$fp) { From 07c69b13ee8b9ffe3e2b67c3648d5ba708d35639 Mon Sep 17 00:00:00 2001 From: "Ing. Igor Mino" Date: Thu, 3 Sep 2020 14:56:34 +0200 Subject: [PATCH 20/21] added parameters errno, errstr and timeout for fsockopen --- src/Phois/Whois/Whois.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phois/Whois/Whois.php b/src/Phois/Whois/Whois.php index c3fdab7..ace66c9 100644 --- a/src/Phois/Whois/Whois.php +++ b/src/Phois/Whois/Whois.php @@ -76,7 +76,7 @@ public function info() return "Whois server not exist error!"; } // Getting whois information - $fp = fsockopen($whois_server, 43); + $fp = fsockopen($whois_server, 43, $errno, $errstr, 20); if (!$fp) { return "Connection error!"; } From b860d235b798221e9208ab6f71b8e29f2da12c48 Mon Sep 17 00:00:00 2001 From: "Ing. Igor Mino" Date: Wed, 11 Sep 2024 14:32:08 +0200 Subject: [PATCH 21/21] removed "UNMAINTAINED" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d9253fd..49c8dd0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# php-whois (UNMAINTAINED) +# php-whois PHP class to retrieve WHOIS information.