nossie Posted March 15, 2009 Share Posted March 15, 2009 Hello guys, I have a small question about a domain availability function.. I'm inneed of an accurate function that returns a "1" if the checked domain is registered. At the moment im using this : function iswebexist($url) { $url = strtolower($url); $d = gethostbyname($url); if ($d!=$url) {return(1);} } ?> It works, but the problem is its only checking if the hostname is alive, not if its registered. Does anyone have ideas how to modify this function so that i can see results from domains that really are registered? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/149512-domain-availability-function/ Share on other sites More sharing options...
Daniel0 Posted March 15, 2009 Share Posted March 15, 2009 You need to perform a whois. Check this out: http://code.google.com/p/php-whois/ I haven't used it. I just found it using a Google search. Link to comment https://forums.phpfreaks.com/topic/149512-domain-availability-function/#findComment-785359 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.