NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page PHP bulk .com availabilty?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 02-17-2006, 01:06 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
nick's Avatar
Join Date: Jun 2004
Location: Iowa City
Posts: 703
nick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud of
 


Save The Children

PHP bulk .com availabilty?


How can I use PHP to bulck check available domain names?

I want to go through a list of 2,000 words and add things like "fans" to the end of them to see if they are available.

example:

word1fans.com
word2fans.com
etc...all the way to word2000fans.com
__________________
formally ninedogger
------
Want to talk to a stranger? -->| Click Here | TalkToAStranger.com | <-- Meet New Friends
nick is offline  
Old 02-17-2006, 05:47 PM   #2 (permalink)
Tech Support
Join Date: Mar 2005
Posts: 4,944
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
PHP Code:
for($i 0$i <= '2000'$i++)
{
  echo 
'word'.$i.'fans.com<br>';

Would get you word1fans.com etc.. You could substitute the echo'ing with some php function/script that returns "Available" or "Registered". Plenty of php whois scripts out there..

EDIT:

You could use something like this
PHP Code:
<?php

$whois_servers 
= array('com' => 'whois.verisign-grs.net',
                       
'net' => 'whois.verisign-grs.net',
                       
'org' => 'whois.publicinterestregistry.net',
????: NamePros.com http://www.namepros.com/programming/168573-php-bulk-com-availabilty.html
                       
'info' => 'whois.afilias.info',
                       
'biz' => 'whois.neulevel.biz'
                      
);

function 
whois($query)
{
  global 
$whois_servers;
  
  
$available "No match";
  
$available2 "Not found";
  
  
$query str_replace("http://"""$query);
  
  if(
substr($query04) == 'www.')
  {
    
$query substr($query4);
  }
  
  
$check explode("."$query);
  
$ext trim($check[1]);

  
reset($whois_servers);
  
$server $whois_servers[$ext];

  
$fp fsockopen($server43);

  if(!
$fp)
  {
    die(
'Could Not Connect To Server.');
  }
  else
  {
    
$send fputs($fp$query."\r\n");

    if(!
$send)
    {
      die(
'Unable to send request.');
    }
????: NamePros.com http://www.namepros.com/showthread.php?t=168573
    else
    {
      while(!
feof($fp))
      {
        
$result .= fgets($fp10240);
      }

      if(
eregi($available$result) || eregi($available2,$result))
      {
        return 
$query.' is available.';
      }
      else
      {
        return 
$query.' is registered.';
      }
      
fclose($fp);
    }
  }
}
?>
PHP Code:
for($i 0$i <= '2000'$i++)
{
  echo 
whois('word'.$i.'fans.com')."<br>\n";

Output (only went with 10)
Code:
word0fans.com is available.
word1fans.com is available.
word2fans.com is available.
word3fans.com is available.
word4fans.com is available.
word5fans.com is available.
word6fans.com is available.
word7fans.com is available.
word8fans.com is available.
word9fans.com is available.
word10fans.com is available.
Last edited by SecondVersion; 02-17-2006 at 06:24 PM.
Eric is offline  
Old 02-18-2006, 10:09 AM THREAD STARTER               #3 (permalink)
NamePros Regular
 
nick's Avatar
Join Date: Jun 2004
Location: Iowa City
Posts: 703
nick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud of
 


Save The Children
works like a charm

thanks!
__________________
formally ninedogger
------
Want to talk to a stranger? -->| Click Here | TalkToAStranger.com | <-- Meet New Friends
nick is offline  
Old 02-22-2006, 12:58 AM   #4 (permalink)
NamePros Regular
 
Palyriot's Avatar
Join Date: Jul 2004
Location: Seattle, Wa
Posts: 596
Palyriot is a jewel in the roughPalyriot is a jewel in the roughPalyriot is a jewel in the rough
 



Wow SV, nice job. I had no idea how to check whois stuff, but you did it. Thanks a lot SV.
Palyriot is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
21 .coms Bulk Sale namestrands Domains For Sale - Make Offer 0 11-22-2005 05:08 PM
$6.75 .com .net .org for fabulous bulk accounts .edu Domain Name Discussion 6 11-01-2004 04:44 PM
-- $11 June 11 -------------- $12 June 12 -- Prosperous Domains For Sale - Fixed Price 2 06-13-2003 09:12 AM
MegaJackpots.net | SearchForDeals.com | RollerSkater.net | GirlMagazine.org | ETC.!!! Prosperous Domains For Sale - Make Offer 0 06-10-2003 01:51 PM

 
All times are GMT -7. The time now is 02:09 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger