Thread: My Code?
View Single Post
Old 10-23-2007, 01:44 PM   #10 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

I did one of these a year or so ago, and although the code's not that good any more (edit: updated it :)), it does still work. It may come in handy if you do decide to continue.

PHP Code:
$szAddress sprintf('http://www.whois.net/whois_new.cgi?d=%s&tld=%s'$szDomainNoExt$szDomainExt);

curl_setopt($pCurlCURLOPT_URL$szAddress);
curl_setopt($pCurlCURLOPT_HEADERtrue);
curl_setopt($pCurlCURLOPT_RETURNTRANSFERtrue);
curl_setopt($pCurlCURLOPT_FOLLOWLOCATIONtrue);

$szData curl_exec($pCurl);
curl_close($pCurl);
    
if(
strpos(strip_tags($szData), 'No match found for'))
{
    return 
false;
}

return 
true
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote