This would only check whether there is a current and responsive web server located at the requested domain. If I have the domain
www.reserverforfutureprojects.com which I intend to use next year, you won't get a 200 status code, but the domain is still taken.
One of the ways to do this is talk with your ISP. They often have web services or web pages available that allow you to query their domain lists programmatically.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.