NameSilo

A Script Request-About Domains

Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
SpaceshipSpaceship
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
Close
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
Close
thanx Mikor
can some1 get the script to work? doesnt work for me
 
0
Close
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
Close
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
Close
it might be that your host has disabled fsock
 
0
Close
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
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back