Getting a domain's expiry date

Hi

I was hoping someone could advise me. I’ve got a background in PHP and so was thinking of developing a website that lists domains that are either within days of their expiry or just expired.

However the more I research it the more it seems to be not quite as simple as I first thought. To come to the point it seems that getting the expiry date with PHP would mean interfacing with an API of say Namejet, Snapnames or constantly reading from a .csv file these companies provide. You can’t just get it from querying a whois server?

Could someone confirm this and if possible provide any other info from the technical side of things regarding what actually happens when a domain doesn’t get renewed.

Many thanks

You can get the domain expiry from a whois, however to do a whois you need a domain name - you can’t ask a whois server for domains about to expire.

When a domain doesn’t get renewed, it is put into a “holding” state to allow the original owner to renew it, before it eitehr goes up for auction or is put straight back onto the open market.

Your best bet is to perform a WHOIS search and ask the owner once you get his/her details. Who knows, they might be eager to sell it to you.