HelgeSverre / Domain-Availability

A PHP Class used to check if a domain has been registered
MIT License
266 stars 137 forks source link

on searching .co.uk or co.in getting error #21

Closed ranasoyab closed 8 years ago

ranasoyab commented 8 years ago

Fatal error: Uncaught exception 'Exception' with message 'No WHOIS entry was found for that TLD' in /var/www/html/api/domain/src/Service/DomainAvailability.php:50

I tried to add co.uk or co.in servers to src/data/servers.json then error message is comming WHOIS query failed

Please help.

ranasoyab commented 8 years ago

http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1

List of all TLD's

WilliamPearce commented 8 years ago

ranasoyab

add the following as entries in src/data/servers.json

"co.uk": {
  "server": "whois.nic.uk",
  "not_found": "This domain name has not been registered."
},    
"co.in": {
  "server": "whois.inregistry.net",
  "not_found": "NOT FOUND"
},

Happy New Year

Bill

ranasoyab commented 8 years ago

Thanks its working :) Please can you let me how you find this servers.

WilliamPearce commented 8 years ago

From https://publicsuffix.org/list/effective_tld_names.dat .co.uk is from the same registry (Nominet) as .uk, which is already in servers.json. Same with .co.in which has the same registry as .in. Others may not be so easy to find.

ranasoyab commented 8 years ago

Thank you very much :)

HelgeSverre commented 8 years ago

@WilliamPearce would you mind creating a PR with the fix? :)

LadyNay commented 6 years ago

Hi there, I am from South Africa. I am building a domains website, and found your script. Other scripts I have used do not work the right way or give the results as I have hoped.

I have added this to the array of domains: "co.za" => array("whois.registry.net.za", "Available "),

and this to the server.json: "co.za": { "server": "whois.registry.net.za", "not_found": "Available " },

Even with other Whois server information I am unable to find the TLD

I have gotten the information from here: https://publicsuffix.org/list/effective_tld_names.dat

// za : http://www.zadna.org.za/content/page/domain-information

https://www.registry.net.za/content.php?wiki=1&contentid=59&title=WHOIS%20Services

But either way I am met with the error: Fatal error: Uncaught Exception: WHOIS server not found for that TLD

Do you have any suggestions or ideas to what I may be doing wrong.