[advanced search]
Results from the most recent live auction are here.
26 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming > CODE
User Name
Password

Old 08-05-2005, 02:49 PM   · #1
Refrozen
Account Closed
 
Refrozen's Avatar
 
Trader Rating: (6)
Join Date: Jun 2005
Posts: 747
NP$: 0.50 (Donate)
Refrozen will become famous soon enoughRefrozen will become famous soon enough
SCRIPTABLE WHOIS Queryer

PHP Code:
<?
        $vowelArray
= array('a','e','i','o','u');

        
$base = $argv[1];

        if(
$base == "help") { echo "base start end [v|d]\n v = vowels only, d = debug mode"; }
        if(
$base == "debug") { print_r($argv); print_r($vowelArray); }
        
$start = $argv[2];
        
$end = $argv[3];
        
$arg = '';
        
$arg = @$argv[4];

        if(
$arg == "v") {
                
$start=0;
                
$end=count($vowelArray);
        }

        for(
$i=$start;$i<$end;$i++) {
                if(
$arg == 'd') { echo $i . " of " . $end . "\n"; }
                
$use = $i;
                if(
$arg=="v") {
                        
$use = $vowelArray[$i];
                }
                
$query = str_replace("*", $use, $base);
                echo
"---- $query ---- \n";
                
ob_start();
                        
system("whois " . $query);
                
$content = ob_get_contents();
                
ob_end_clean();
                if(
stristr($content, "no match")) {
                        echo
"\tNo match found for " . $query . "\n";
                } else {
                        echo
"\tMatch found for " . $query . "\n";
                }
        }
?>


Automated WHOIS querier, scriptable. Use it like this:

php -q p-whois.php d*main.com a z

That will outpit the status of

damain.com
dbmain.com
dcmain.com
...
dzmain.com

Note, automated whois querying is against the rules of most databases, you may have to configure the system() line to use your own whois db, rather than whatever whois chooses.

Note, will only work on Linux systems, or systems supporting the 'whois' command at the commandline.

Please give me NP$ or Reputation if you find this useful


Please register or log-in into NamePros to hide ads
Refrozen is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
soooo many yahoo's redhippo Domain Name Discussion 5 07-12-2005 11:26 PM
Deleted Domain List Site FREE dropscripts For Sale / Advertising Board 12 09-24-2003 07:16 AM

Site Sponsors
http://www.mobisitetrader.com/ Grow your forum! http://www.mobisitetrader.com/
Advertise your business at NamePros
All times are GMT -7. The time now is 04:38 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0