Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A CRON job that emails me a list of domains set to expire the next day
<?php
$tomorrow = mktime(0, 0, 0, date("m"), date("d")+1, date("Y"));
$tomorrow_egrep = date('n/j/Y', $tomorrow); # like "10/19/2012" without quotes
$shellCommands= <<<END
rm ~/temp/PoolDeletingDomainsList.zip ~/temp/PoolDeletingDomainsList.txt ~/temp/email_tmp.txt ~/temp/tomorrow.txt;
wget http://www.pool.com/Downloads/PoolDeletingDomainsList.zip -O ~/temp/PoolDeletingDomainsList.zip -q;
unzip -o ~/temp/PoolDeletingDomainsList.zip -d ~/temp/;
egrep -e "{$tomorrow_egrep}" ~/temp/PoolDeletingDomainsList.txt > ~/temp/tomorrow.txt;
egrep "^[a-z]{2,7}bot.com," ~/temp/tomorrow.txt > ~/temp/email_tmp.txt;
echo "-----" >> ~/temp/email_tmp.txt;
egrep "^[a-z]{2,7}.com," ~/temp/tomorrow.txt >> ~/temp/email_tmp.txt;
cut -d, -f1 ~/temp/email_tmp.txt > ~/temp/email.txt;
cat ~/temp/email.txt | sed 's/\\n/ /g' | mail -s "Expiring domains" youremail@example.org
END;
shell_exec($shellCommands);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.