Created
April 15, 2012 01:48
-
-
Save louismullie/2389285 to your computer and use it in GitHub Desktop.
Expired Domain Name Catching Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domain = "www.test.com" | |
email = "[email protected]" | |
password = "test" | |
require 'whois' | |
require 'gmail' | |
client = Whois::Client.new | |
while true | |
puts "Checked at #{Time.now.to_s}" | |
break if client.query(domain).available? | |
sleep 60 | |
end | |
puts "Domain is now available!" | |
gmail = Gmail.new(email, password) | |
email = gmail.deliver do | |
to email | |
subject "Domain #{domain} has expired!" | |
body "The name you wanted is now available." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script will check every minute if a domain is available or not, and will send you a G-mail message when the domain becomes available.