AjaxWhois - fast domain availability search and whois
Ajax Whois Script : A simple, yet powerful domain name whois checking program written in PHP.
Automatically checks multiple extensions and gives you the results in seconds. Whois Script checks: .com .net .org .info .biz .us .co.uk .me.uk .org.uk and much more.
Php whois script version: 1.0
Features
* Everything done without refreshing the page.
* Domain name extension can be added easily.
* Easily intergrated into thirdparty shopping cart for domain name reseller.
Requirement
* Php 4.0 or above, Apache/IIS (Linux, Mac, Windows).
Rate this script!
Change log
Details
Download AjaxWhois
Hi again,
After testing - It seems that all cTLD’s don’t work.
Where the $_POST replaces ‘.’ with ‘_’ and thus testing fails.
For example, ‘co.uk’ becomes ‘co_uk’ and thus checkox value is always null.
Did u QA this?
The issue is solved , please download it again.
There is a problem with german Domains (.de) all Domains are taken. (try it by typing: klxmfdfddddddd or a other stupid Domain). Please repair the problem.
Your Script is very very very nice. I love it.
Hi klxm,
Please modifiy the response text for .de domains from : “not found in database” in “free” in AjaxWhois.php line 165.
Hi
I’m trying to get this working with .com.au domains without success. All searches are returning taken. Here is the link to the Ausregistry lookup http://www.ausregistry.com.au/availability.php
Details are at the bottom of the page. I have tried “Not Available”, “\nAvailable” and a heap of other response lines without success.
Any help would be appreciated.
Thanks
Hi David,
Please use “No Data Found” instead of “Not Available” for com.au. domains.
Hi
Still getting the “TAKEN” response with “No Data Found”.
$this->serverList[5][’tld’] = com.au’;
$this->serverList[5][’server’] = ‘whois-check.ausregistry.net.au’;
$this->serverList[5][’response’] = ‘No Data Found’;
I’ve also tried it on another server in case the IP was being blocked for some reason. All other domains are fine, only having problems with com.au.
The whois returns a correct result for domains that are registered so that part is ok.
I do have success if I query the whois.ausregistry.net.au database with ‘No Data Found’ it works fine but this service is subject to black listing at 20 requests per day therefore the whois-check.ausregistry.net.au is their recommended server.
The whois-check server responds with ‘Available’ or ‘Not Available’. I read in a post related to an old whois script that the response may not being processed properly because “Not Available’ also contains “Available” and may not be being processed correctly by the script?
Thanks for your help so far, any suggestions?
Regards
David
You can use only the word “Not”, in this way the script will not find the “Available” word in both cases.
Do you know of any way around this or is the script just not suitable for the whois-check…au lookup?
Hi David,
Please use :
$this->serverList[13][’tld’] = ‘com.au’;
$this->serverList[13][’server’] = ‘whois-check.ausregistry.net.au’;
$this->serverList[13][’response’] = ‘Not’;
This will solve the availability issue , but you will not have the whois information because this whois server is not returning it.
Thanks,
Almost there, just reversing the results.
Now returning an ‘Available’ response for domains that are registered and a ‘Taken’ response for domains that are available.
Is there a fix, but I also want to lookup .com etc addresses.
Hi David,
Please replace CheckDomain function with this one :
function checkDomain($domain,$server,$findText){
$con = fsockopen($server, 43);
if (!$con) return false;
fputs($con, $domain."\r\n");
$response = ' :';
while(!feof($con)) {
$response .= fgets($con,128);
}
fclose($con);
$tld = substr($domain, -3, 3);
//echo $tld;
if ($tld == ".au") {
if (strpos($response, $findText)){
return false;
}
else {
return true;
}
} else {
if (strpos($response, $findText)){
return true;
}
else {
return false;
}
}
}
Works great, thanks for all of your help.