podja Posted December 22, 2006 Share Posted December 22, 2006 Hi, on my website I am wanting to have some sort of domain checker. I basically need to know if this is possible with PHP, and if it is, how do I go about doing it. Any help would be greatly appreciated! Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/ Share on other sites More sharing options...
Psycho Posted December 22, 2006 Share Posted December 22, 2006 You need to explain by what you mean by "domain checker". Check the domain for: availability, is the site up, ??? Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/#findComment-146468 Share on other sites More sharing options...
podja Posted December 22, 2006 Author Share Posted December 22, 2006 yes sorry, check if a domain is available. Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/#findComment-146486 Share on other sites More sharing options...
martinstan Posted December 22, 2006 Share Posted December 22, 2006 HiI got a free one from here:http://www.ratite.com/whois/link_to_global_whois.htmlMartin Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/#findComment-146524 Share on other sites More sharing options...
podja Posted December 22, 2006 Author Share Posted December 22, 2006 I only want to check if the domain name is available or not. I do not need all the WhoIs info. thanks anyway! Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/#findComment-146526 Share on other sites More sharing options...
Psycho Posted December 22, 2006 Share Posted December 22, 2006 [quote author=podja link=topic=119643.msg490296#msg490296 date=1166815089]I only want to check if the domain name is available or not. I do not need all the WhoIs info. thanks anyway![/quote]I guess I have to point out the obvious. If you were to use the whois code and data is returned you could assume the domain is taken - you don't have to display the returned data. Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/#findComment-146582 Share on other sites More sharing options...
michaellunsford Posted December 23, 2006 Share Posted December 23, 2006 Hmmm... whois used to have a disclaimer. It went something like, lack of a record does not necessarily guarantee domain name availability. Has that changed recently? Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/#findComment-146641 Share on other sites More sharing options...
redarrow Posted December 23, 2006 Share Posted December 23, 2006 [code]<?php /*Simply place the code whois($domain,$ext); in any page and create a form with the fields domain and extension. A sample is listed below. You could add the whois($domain,$ext); to the bottom of this script and point a form to it and you will get the whois results. Please not the http://www. is not required. */ /*Form example: <form action="http://mydomain.com/whois.php" method="post">Domain:(http://www.)<input type="text" name="domain"><br>Extension: <select name="ext"> <option value=".co.uk">.co.uk</option> <option value=".com">.com</option> <option value=".biz">.biz</option> <option value=".fr">.fr</option> <selected>Please choose one..</selected> </select> <br><input type="submit" name="submit" value="look-up"> </form> */ extract($_POST); function whois($domain,$ext){ $url=$domain.$ext; switch($ext){ case ".co.uk": $whois = "whois.nic.uk"; break; case ".com": $whois = "whois.networksolutions.com"; break; case ".fr": $whois = "whois.nic.fr"; break; case ".biz": $whois = "whois.biz"; break; default: $whois = "whois.networksolutions.com"; } if (trim($url) <> "") { $url = trim($url); $f = fsockopen($whois, 43, $errno, $errstr, 30); if (!$f) { echo "Connection To Server Failed ($errno)"; } else { fputs($f, "$url\r\n"); print "<pre>\r\n"; while (!feof($f)) { echo fread($f,128); } print "</pre>"; fclose($f); } }else{ echo "Invalid domain entered"; } } ?> [/code] Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/#findComment-146799 Share on other sites More sharing options...
Psycho Posted December 23, 2006 Share Posted December 23, 2006 [quote author=michaellunsford link=topic=119643.msg490412#msg490412 date=1166833676]Hmmm... whois used to have a disclaimer. It went something like, lack of a record does not necessarily guarantee domain name availability. Has that changed recently?[/quote]I'm sure it hasn't, but I have yet to find a domain availability page that was 100% accurate. Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/#findComment-147052 Share on other sites More sharing options...
ted_chou12 Posted December 23, 2006 Share Posted December 23, 2006 yes, it is possible, but how do you want to do it???? Link to comment https://forums.phpfreaks.com/topic/31598-domain-checker/#findComment-147071 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.