kevinoo / phpwhois Goto Github PK
View Code? Open in Web Editor NEWThis project forked from phpwhois/phpwhois
phpWhois general repository
Home Page: https://phpwhois.pw
License: GNU General Public License v2.0
This project forked from phpwhois/phpwhois
phpWhois general repository
Home Page: https://phpwhois.pw
License: GNU General Public License v2.0
Just notice an exception:
Runtime: PHP-8.2
Exception: Creation of dynamic property arin_handler::$deepWhois is deprecated
File: vendor/kevinoo/phpwhois/src/WhoisClient.php
Line: 492
Regards
Just noticed an exception triggered by whois "IP", here are a few IPs that triggered the following exception
Exception-Code: 2
Exception-Message: Undefined array key "rawdata"
File: vendor/kevinoo/phpwhois/src/Handlers/RwhoisHandler.php
Line: 42
Trace: `#0 vendor/kevinoo/phpwhois/src/Handlers/RwhoisHandler.php(42): Whoops\Run->handleError()
#1 vendor/kevinoo/phpwhois/src/WhoisClient.php(495): phpWhois\Handlers\RwhoisHandler->parse()
#2 vendor/kevinoo/phpwhois/src/Handlers/IpHandler.php(167): phpWhois\WhoisClient->process()
#3 vendor/kevinoo/phpwhois/src/Handlers/IpHandler.php(144): phpWhois\Handlers\IpHandler->parse_results()
#4 vendor/kevinoo/phpwhois/src/WhoisClient.php(495): phpWhois\Handlers\IpHandler->parse()
#5 vendor/kevinoo/phpwhois/src/WhoisClient.php(271): phpWhois\WhoisClient->process()
#6 vendor/kevinoo/phpwhois/src/Whois.php(134): phpWhois\WhoisClient->getData()
#7 vendor/kevinoo/phpwhois/src/Whois.php(76): phpWhois\Whois->lookup()
#8 vendor/main/app-lib/src/Lib/Stateful/Whois.php(255): phpWhois\Whois->whois()
Handlers\AbstractHandler::generic_parser_a_blocks()
Issue: The return type mitchmatched
Details:
Return type of this method is an array, but the initial value of the $blocks
variable is false so when it's falling back to the default it's throwing a TypeError.
Possible fix:
The initial value of the $blocks
variable should be an array
Fix the countless warnings found by app.codacy.com 🤕
Thanks for sharing your fork!
I'm hoping you might have some insight into why it appears the handler isn't adding the Registrar info from the rawdata to the object below.
I see in Handlers/CoopHandler.php it appears these statically assigned regyinfo['registrar'] isn't being used either.
$r['regyinfo'] = [
'referrer' => 'https://www.nic.coop',
'registrar' => '.coop registry',
];
rawdata->Array
0->Domain Name: domains.coop
1->Registry Domain ID: D7881481-CNIC
2->Registrar WHOIS Server: http://whois.domains.coop/
3->Registrar URL: http://www.domains.coop/
4->Updated Date: 2022-12-07T18:05:04.957Z
5->Creation Date: 2002-07-09T10:21:51.000Z
6->Registry Expiry Date: 2024-07-09T23:59:59.000Z
7->Registrar: Domains.coop Limited
8->Registrar IANA ID: 465
9->Registrar Abuse Contact Email: [email protected]
10->Registrar Abuse Contact Phone: +44.1865403136
11->Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
12->Registry Registrant ID: REDACTED FOR PRIVACY
13->Registrant Name: REDACTED FOR PRIVACY
14->Registrant Organization: Domains.coop Limited
15->Registrant Street: REDACTED FOR PRIVACY
16->Registrant City: REDACTED FOR PRIVACY
17->Registrant State/Province: Oxfordshire
18->Registrant Postal Code: REDACTED FOR PRIVACY
19->Registrant Country: GB
20->Registrant Phone: REDACTED FOR PRIVACY
21->Registrant Fax: REDACTED FOR PRIVACY
22->Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
23->Registry Admin ID: REDACTED FOR PRIVACY
24->Admin Name: REDACTED FOR PRIVACY
25->Admin Organization: REDACTED FOR PRIVACY
26->Admin Street: REDACTED FOR PRIVACY
27->Admin City: REDACTED FOR PRIVACY
28->Admin State/Province: REDACTED FOR PRIVACY
29->Admin Postal Code: REDACTED FOR PRIVACY
30->Admin Country: REDACTED FOR PRIVACY
31->Admin Phone: REDACTED FOR PRIVACY
32->Admin Fax: REDACTED FOR PRIVACY
33->Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
34->Registry Tech ID: REDACTED FOR PRIVACY
35->Tech Name: REDACTED FOR PRIVACY
36->Tech Organization: REDACTED FOR PRIVACY
37->Tech Street: REDACTED FOR PRIVACY
38->Tech City: REDACTED FOR PRIVACY
39->Tech State/Province: REDACTED FOR PRIVACY
40->Tech Postal Code: REDACTED FOR PRIVACY
41->Tech Country: REDACTED FOR PRIVACY
42->Tech Phone: REDACTED FOR PRIVACY
43->Tech Fax: REDACTED FOR PRIVACY
44->Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
45->Registry Billing ID: REDACTED FOR PRIVACY
46->Billing Name: REDACTED FOR PRIVACY
47->Billing Organization: REDACTED FOR PRIVACY
48->Billing Street: REDACTED FOR PRIVACY
49->Billing City: REDACTED FOR PRIVACY
50->Billing State/Province: REDACTED FOR PRIVACY
51->Billing Postal Code: REDACTED FOR PRIVACY
52->Billing Country: REDACTED FOR PRIVACY
53->Billing Phone: REDACTED FOR PRIVACY
54->Billing Fax: REDACTED FOR PRIVACY
55->Billing Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
56->Name Server: ns0.centralnic-dns.com
57->Name Server: ns1.centralnic-dns.com
58->Name Server: ns2.centralnic-dns.com
59->Name Server: ns3.centralnic-dns.com
60->Name Server: ns4.centralnic-dns.com
61->Name Server: ns5.centralnic-dns.com
62->DNSSEC: unsigned
63->URL of the ICANN RDDS Inaccuracy Complaint Form: https://www.icann.org/wicf/
64->
65->>>> Last update of WHOIS database: 2023-08-01T19:13:14.175Z <<<
66->
67->For more information on domain status codes, please visit https://icann.org/epp
68->
69->The WHOIS information provided in this page has been redacted
70->in compliance with ICANN's Temporary Specification for gTLD
71->Registration Data.
72->
73->The data in this record is provided by Uniregistry for informational
74->purposes only, and it does not guarantee its accuracy. Uniregistry is
75->authoritative for whois information in top-level domains it operates
76->under contract with the Internet Corporation for Assigned Names and
77->Numbers. Whois information from other top-level domains is provided by
78->a third-party under license to Uniregistry.
79->
80->This service is intended only for query-based access. By using this
81->service, you agree that you will use any data presented only for lawful
82->purposes and that, under no circumstances will you use (a) data
83->acquired for the purpose of allowing, enabling, or otherwise supporting
84->the transmission by e-mail, telephone, facsimile or other
85->communications mechanism of mass unsolicited, commercial advertising
86->or solicitations to entities other than your existing customers; or
87->(b) this service to enable high volume, automated, electronic processes
88->that send queries or data to the systems of any Registrar or any
89->Registry except as reasonably necessary to register domain names or
90->modify existing domain name registrations.
91->
92->Uniregistry reserves the right to modify these terms at any time. By
93->submitting this query, you agree to abide by this policy. All rights
94->reserved.
95->
regyinfo->Array
servers->Array
0->Array
server->whois.nic.coop
args->domains.coop
port->43
type->domain
regrinfo->Array
domain->Array
name->domains.coop
nserver->Array
ns0.centralnic-dns.com->185.24.67.200
ns1.centralnic-dns.com->185.24.67.201
ns2.centralnic-dns.com->212.18.251.202
ns3.centralnic-dns.com->212.18.251.203
ns4.centralnic-dns.com->193.227.117.204
ns5.centralnic-dns.com->194.50.187.205
registered->yes
Thanks for your hard work on this lib!
I noticed .org domains don't seem to be returning regrinfo/domain/expires dates or regrinfo/registrar even though it does exist in the rawdata. Below is an example i'm seeing consistently with .org domains on both the 6.3.0 release and the dev-main.
rawdata->Array
0->This domain is protected by the Registry Lock service. If you are the registrant and wish to take action on this lock, please contact your registrar.
1->
2->Domain Name: icann.org
3->Registry Domain ID: 628dbbcb4edc464b9401cbadea0a08b2-LROR
4->Registrar WHOIS Server: http://whois.godaddy.com
5->Registrar URL: http://www.whois.godaddy.com
6->Updated Date: 2023-02-14T22:18:25Z
7->Creation Date: 1998-09-14T04:00:00Z
8->Registry Expiry Date: 2027-12-07T17:04:26Z
9->Registrar: GoDaddy.com, LLC
10->Registrar IANA ID: 146
11->Registrar Abuse Contact Email: [email protected]
12->Registrar Abuse Contact Phone: +1.4806242505
13->Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
14->Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited
15->Domain Status: clientRenewProhibited https://icann.org/epp#clientRenewProhibited
16->Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
17->Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited
18->Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
19->Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited
20->Registry Registrant ID: REDACTED FOR PRIVACY
21->Registrant Name: REDACTED FOR PRIVACY
22->Registrant Organization: ICANN
23->Registrant Street: REDACTED FOR PRIVACY
24->Registrant City: REDACTED FOR PRIVACY
25->Registrant State/Province: California
26->Registrant Postal Code: REDACTED FOR PRIVACY
27->Registrant Country: US
28->Registrant Phone: REDACTED FOR PRIVACY
29->Registrant Phone Ext: REDACTED FOR PRIVACY
30->Registrant Fax: REDACTED FOR PRIVACY
31->Registrant Fax Ext: REDACTED FOR PRIVACY
32->Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
33->Registry Admin ID: REDACTED FOR PRIVACY
34->Admin Name: REDACTED FOR PRIVACY
35->Admin Organization: REDACTED FOR PRIVACY
36->Admin Street: REDACTED FOR PRIVACY
37->Admin City: REDACTED FOR PRIVACY
38->Admin State/Province: REDACTED FOR PRIVACY
39->Admin Postal Code: REDACTED FOR PRIVACY
40->Admin Country: REDACTED FOR PRIVACY
41->Admin Phone: REDACTED FOR PRIVACY
42->Admin Phone Ext: REDACTED FOR PRIVACY
43->Admin Fax: REDACTED FOR PRIVACY
44->Admin Fax Ext: REDACTED FOR PRIVACY
45->Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
46->Registry Tech ID: REDACTED FOR PRIVACY
47->Tech Name: REDACTED FOR PRIVACY
48->Tech Organization: REDACTED FOR PRIVACY
49->Tech Street: REDACTED FOR PRIVACY
50->Tech City: REDACTED FOR PRIVACY
51->Tech State/Province: REDACTED FOR PRIVACY
52->Tech Postal Code: REDACTED FOR PRIVACY
53->Tech Country: REDACTED FOR PRIVACY
54->Tech Phone: REDACTED FOR PRIVACY
55->Tech Phone Ext: REDACTED FOR PRIVACY
56->Tech Fax: REDACTED FOR PRIVACY
57->Tech Fax Ext: REDACTED FOR PRIVACY
58->Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
59->Name Server: ns.icann.org
60->Name Server: a.icann-servers.net
61->Name Server: b.icann-servers.net
62->Name Server: c.icann-servers.net
63->DNSSEC: signedDelegation
64->URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
65->>>> Last update of WHOIS database: 2023-09-07T13:21:16Z <<<
66->
67->For more information on Whois status codes, please visit https://icann.org/epp
68->
69->Terms of Use: Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Identity Digital except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
regyinfo->Array
servers->Array
0->Array
server->whois.pir.org
args->icann.org
port->43
type->domain
regrinfo->Array
domain->Array
name->icann.org
nserver->Array
a.icann-servers.net->199.43.135.53
b.icann-servers.net->199.43.133.53
c.icann-servers.net->199.43.134.53
ns.icann.org->199.4.138.53
registered->yes
hope this helps!
Move whois.gtld.*
files into the namespace phpWhois\Handlers\Gtld
, using AbstractHandler class
Hi,
I created a database for all TLDs, and after checking available servers, I figured out that the below TLDs are not supported. So it will be a good idea to add a whois server for each TLD:
[
".moe",
".games",
".닷컴",
".닷넷",
".コム",
".bet",
".sex",
".gold",
".family",
".win",
".vin",
".osaka",
".wine",
".rent",
".stream",
".mba",
".ren",
".भारत",
".group",
".ph",
".com.ph",
".net.ph",
".org.ph",
".taxi",
".plus",
".soccer",
".ભારત",
".pet",
".loan",
".tube",
".coupons",
".faith",
".shopping",
".网站",
".gmbh",
".ਭਾਰਤ",
".auto",
".hospital",
".download",
".yokohama",
".promo",
".party",
".eco",
".ভারত",
".movie",
".doctor",
".tickets",
".science",
".accountant",
".car",
".show",
".بھارت",
".salon",
".dog",
".कंपनी.भारत",
".mom",
".review",
".fyi",
".express",
".love",
".cars",
".studio",
".team",
".golf",
".racing",
".cafe",
".game",
".ski",
".date",
".men",
".இந்தியா",
".irish",
".భారత్",
".hockey",
".jewelry",
".lol",
".theater",
".娱乐",
".ею",
".boston",
".boats",
".fan",
".monster",
".קום",
".charity",
".llc",
".realestate",
".health",
".contact",
".gay",
".cyou",
".srl",
".bond",
".ευ",
".skin",
".makeup",
".beauty",
".quest",
".hair",
".cfd",
".rugby",
".sbs",
".basketball",
".bible",
".dealer",
".example",
".ist",
".istanbul",
".law",
".observer",
".open",
".protection",
".realty",
".security",
".storage",
".theatre",
".forum",
".compare",
".select"
]
This is not a critical problem.
composer update
command
Failed to extract kevinoo/phpwhois: (50) '/usr/bin/unzip' -qq '<PROJECT>/vendor/composer/tmp-7bba08f253d7ee13f07301f6286873fe.zip' -d '<PROJECT>/vendor/composer/a8016ac8'
error: cannot create <PROJECT>/vendor/composer/a8016ac8/kevinoo-phpWhois-8ca26c5/tests/fixtures/?????.????.txt
Illegal byte sequence
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.