Unstoppable Domains

A Script Request-About Domains

Spaceship Spaceship
Watch

phantomddl

Established Member
Impact
6
There will be a PHP Script and a TXT File
lets say, i have domains.php and domains.txt
i will put some domain names into the txt file and domains.php will check each domain in it if they are available, and when one is available, it will send an e-mail to my address. i will set a cron for it
please pm me your price for this script
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Its a simple script, so here it is for free - I suppose you could pay me if you really wanted to :P

<edit> I cant actually figure out why the below code dosnt work, so if someone else could point out my mistake, please do.

PHP:
<?php 
//This only supports .COM, .NET and .BIZ domains - but more could be added easily. 
//Because I gave you this code untested, i cannot guarantee that it will work perfectly. I may have made a few typos in the NP New Post box. 

$email = 'your_email_address_here'; 
$file_location = 'http://www.domain.com/list.txt'; 

//Each domain MUST be on a new line! 
$domains = file($file_location); 
$domain_list = 'Domains:\r\n\r\n';

foreach($domains as $domain){
	$server = 'null';
	$domain = trim($domain);
	if(stristr($domain, '.COM') || stristr($domain, '.NET')){ 
		$server = 'rs.internic.net'; 
	}elseif(stristr($domain, '.BIZ')){ 
		$server = 'whois.biz';
	}else{ 
		$server = 'null'; 
	}
	if($server != 'null'){
		$sock = fsockopen($server,43) or die('Error Connecting To Whois Server');  
		fputs($sock,$domain.'\r\n');  
		while(!feof($sock)){  
			$result .= fgets($sock,1024);  
		} 
		fclose($sock);  
		if(eregi('No match',$result)||eregi('NOT FOUND',$result)){ 
			$domain_list .= $domain.' is avaliable.\r\n'; 
		}else{ 
			$domain_list .= $domain.' is unavaliable.\r\n'; 
		} 
	}
}
mail($email, 'Domains', $domain_list); 
?>
 
Last edited:
0
•••
thanx Mikor
can some1 get the script to work? doesnt work for me
 
0
•••
Assuming that the whois part is OK, this should do it.

PHP:
<?php  
//This only supports .COM, .NET and .BIZ domains - but more could be added easily.  
//Because I gave you this code untested, i cannot guarantee that it will work perfectly. I may have made a few typos in the NP New Post box.  

$email = 'your_email_address_here';  
$file_location = 'http://www.domain.com/list.txt';  

//Each domain MUST be on a new line!  
$domains = file_get_contents($file_location);  
$domain_list = 'Domains:\r\n\r\n'; 

$domains = explode("\n", $domains);
foreach($domains as $domain){ 
    $server = 'null'; 
    $domain = trim($domain); 
    if(stristr($domain, '.COM') || stristr($domain, '.NET')){  
        $server = 'rs.internic.net';  
    }elseif(stristr($domain, '.BIZ')){  
        $server = 'whois.biz'; 
    }else{  
        $server = 'null';  
    } 
    if($server != 'null'){ 
        $sock = fsockopen($server,43) or die('Error Connecting To Whois Server');   
        fputs($sock,$domain.'\r\n');   
        while(!feof($sock)){   
            $result .= fgets($sock,1024);   
        }  
        fclose($sock);   
        if(eregi('No match',$result)||eregi('NOT FOUND',$result)){  
            $domain_list .= $domain.' is avaliable.\r\n';  
        }else{  
            $domain_list .= $domain.' is unavaliable.\r\n';  
        }  
    } 
} 
mail($email, 'Domains', $domain_list);  
?>
 
0
•••
now there is no error but it takes forever to load.. keeps saying "Loading" like there is no end. it might be about the whois part
 
0
•••
it might be that your host has disabled fsock
 
0
•••
phantomddl said:
it might be about the whois part

Its definatly not that, I use the exact same code in another script of mine - and it works perfectly.
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back