Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

SCRIPTABLE WHOIS Queryer

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Refrozen

Account Closed
Impact
9
PHP:
<?
        $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 ;)
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Appraise.net

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back