TigerTom's Domain Grabber Perl Script. Version: 1.2, Aug. 2002. http://www.tigertom.com/perl-script.shtml ------- 6th Sept.'02. Script can now email a colleague or registrar to ask them to register the domain for you. ------- Aug 14th 2002: Scripts can now operate without Whois being installed on-server. ------- Aug. 12th 2002: Added a feature to check if domains are still in Yahoo or DMOZ. ------------------------------------------------------- This Perl script package informs you immediately when a domain name stops being 'on-hold', and becomes available to register. It currently works for .com, .net and .org domain names only. SETUP: ------- Open the 'domain_grabber_config.cgi' script in a text editor. Define: The path to Sendmail; The webmaster email address; The path to images (if necessary); The path to your list of desired domains; The location of your 'whois' program (if you have one); The location of your lists of domains in Yahoo and DMOZ (if any). Open: 'domain_grabber_whois.cgi' 'domain_grabber_se.cgi' in a text editor. On the first line of each, define the path to Perl on your web server. Then specify the absolute path to the the required config file. ------- Open: 'whois_domains.txt' 'yahoo_domains.txt' 'DMOZ_domains.txt' in a text editor, and put one domain on each line in each file. EXCLUDE the 'http://www.' part!! Include one 'garbage' domain in each to test the script is working. ------ Open: 'mycrontab' in a text editor, and define the absolute paths to the scripts you want to run. ========== Upload: 'domain_grabber_whois.cgi' 'domain_grabber_se.cgi' to your cgi-bin. CHMOD them to 705. Upload: 'yahoo_domains.txt' 'DMOZ_domains.txt' 'whois_domains.txt' to the same directory. Leave them as-is. Upload: 'mycrontab' to the same directory. CHMOD it to 705. In a telnet session in the same directory, type 'crontab mycrontab' (without the ') at the command line. ======== To run via Server Side Includes ========== Add this line to a .htaccess file in your web-facing directory: AddHandler server-parsed .shtml You can change '.shtml' to '.htm' or '.html', if you want. The point is to make web pages with a certain extension executable. (TIP: try specifying one file name only here e.g. AddHandler server-parsed biscuits.htm if you don't want all your pages to be executable. Less work for your server.) Find a web page that gets accessed about twelve times a day. Add this line to the HTML of your web page: The script will run whenever that page is accessed by a browser. Find another page that gets one or two hits a day, and do the same for the 'domain_grabber_se.cgi' script. ======== To run via Crontab ======== Open 'mycrontab', and define how many times you want the scripts to run, and their location. 'mycrontab' is just a text file. If you don't know anything about crontab, leave it as-is, and find a tutorial on the internet. ------ 'mycrontab' is currently set to tun runs the WHOIS script six times a day; at 00.00 hours (12 PM), 04.00 hours (4 AM), 8.00 hours (8 AM), 12.00 hours (12 midday), 16.00 hours (4 PM), and 20.00 hours (8 PM). It runs the search engine checker script once a day, to see if the domains are still in Yahoo and DMOZ. There are FIVE fields to the SCHEDULE: MINUTE(0-59) HOUR(0-23) DAY-OF-MONTH(1-31) MONTH-OF-YEAR(1-12) DAY-OF-WEEK(0-6) [Note 0 = Sunday] Note that the ASTERISK (*) is what's called a WILDCARD meaning it will match any value. IMPORTANT: Leave a *blank* line *after* the last line in this file!! ======= Test the scripts via telnet ============ Telnet to the directory the scripts are in. Type ./domain_grabber_whois.cgi at the command prompt. The script should execute. Do the same for 'domain_grabber_se.cgi'. ======== To run this program via an image link ====== Find a web page that gets about twelve hits a day. Put this hidden image link in the page: Find another page that gets one or two hits a day, and do the same for the 'domain_grabber_se.cgi' script. See 'domain_grabber.shtml' for an example. -------- USAGE: The scripts will now run at the intervals specified in 'mycrontab', or when the the scripts are accessed indirectly by a browser. It will email you when a domain name becomes available, or when it drops out of Yahoo and/or DMOZ. ------ T. O' Donnell, London, August 2002.