Saturday July 31, 2010

Domain Expiration Notify Script

Date: 03/17/2005
Author:
Wayne Eggert

Introduction
If you're in the web hosting business, a server admin, or heck.. just have too many domains at more registrars than you can shake a stick at, you might be worried that eventually you're going to miss re-registering an expiring domain. Most registrars will send an email or two when your domain's about to expire, but they don't go overboard to notify you. If you're not listed as a domain contact or your email address changes, you need another way to make sure the domains you're managing don't expire without giving you proper notification. This script will should help keep your fears at ease and hopefully give you proper notification of that impending doom that is domain expiration =)

Creating the Database
First up is to create the database table for the domain list. This isn't a very sophisticated setup -- there's no backend to manage things, so you will have to be good and aquainted with PHPMyAdmin.

CREATE TABLE `domains` (
`domainName` varchar(100) NOT NULL default '',
`registrar` varchar(100) NOT NULL default '',
`expiration` date NOT NULL default '0000-00-00',
`status` varchar(100) NOT NULL default '',
`lastChecked` timestamp(14) NOT NULL
) TYPE=MyISAM;

Example of what to enter in this database table for each domain you want to check:
domainName - "google.com"
registrar - "GoDaddy"
expiration - Leave Blank
status - Leave Blank
lastChecked - Leave Blank

page1 page2 page3 page4


Comments:
Re: Expiration
Posted 09/21/09 6:17PM by AceBHound
Sounds like the $expiration string isn't getting built correctly. Before the SQL call to UPDATE the domains table, try echo'ing out the $expiration variable and see if it contains YEAR-MONTH-DAY (like 2009-12-31) or if it looks like "--". It's possible the WHOIS server you're using could be using a slightly different format and you'll need to adjust the code that parses out data from the WHOIS call.
Expiration
Posted 09/15/09 4:52PM by Anonymous Techdoser
Great script, everything seems to work well except the expiration field in my database does not update.
Thanks!
Posted 08/14/09 12:21PM by thomascim
Hi Wayne, thanks very much for this useful code.

One suggestion is maybe adding an extra field to the database table for the extension.

This way you can also check domain extensions that have more or less than 3 characters like co.uk or .de, .eu, etc.

Thanks again,

Thomas

problem with exec()
Posted 02/06/09 4:28PM by jschrader
I have installed the code, and am getting an error about the exec(), to be specific:


Warning: exec() has been disabled for security reasons in /home/a5704353/public_html/notify.php on line 38

Free Web Hosting

PHP Error Message

Warning: Invalid argument supplied for foreach() in /home/a5704353/public_html/notify.php on line 39


what is going on?
how to get the registrar
Posted 06/03/07 3:40PM by rocko
Hi, I see your script. It is really good and help me a lot.
But Im trying to use a registrar field. I use different string functions but I couldn't.
There are any way to use the registrar field?
Thanks in advance.
How to set cron tab
Posted 10/16/06 12:01AM by creativetest
How to set cron tab



If you have an account, please login below. You can sign up for a new account, it's free!
You can also post anonymously as Anonymous Techdoser if you leave the username/password fields blank.

*Username
*Password
Subject
Comment  
 




To verify you're a human please type the letters in the image above


*Due to URL spamming, comments will be approved before being posted.




Partners
Sony LCD TV
Read Reviews On Sony LCD TV's
Buy Desktop, Laptop & Netbook Computers online at Big Brown Box
Dish Network HD Programming
Quality resolution with HD from Dish.