Process whois output to only display expiration/updated date and domain status
Posted on 2004-11-27
I want to output the Expiration Date, Updated Date, and Status for a list of domains.
Here is what I got so far:
for i in `cat domain_list`
expire=`whois $i | grep 'xpir'`
echo "$i $expire"
#OUTPUT of a few random picked domains
google.com Expires on..............: 2011-Sep-14.
yahoo.com Expires on..............: 2012-Jan-19.
linux.org Expiration Date:11-May-2013 04:00:00 UTC
movies.net Record expires on 20-Apr-2006.
products.biz Domain Expiration Date: Sat Mar 26 23:59:59 GMT+00:00 2005
gov.us Domain Expiration Date: Tue Apr 17 23:59:59 GMT+00:00 2007
crime.info Expiration Date:13-Jul-2005 19:46:56 UTC
1. Expiration Date
2. Updated Date
1. How would I get just the date (time not needed) and all to be in the same format (11-27-04)?
2. What would be the fastest way to accomplish this task for a large list of domains?
3. I'm somewhat familiar with PHP. Would it be faster with PHP?
4. Is there any way to just request this information with whois rather than having to process the output for what I need?