easiest way i can think of is to try opening a socket to a domain registrar, inserting the domain name in a post header.... then parsing the page that is returned....
I have no clue whether this will work...
That being said, you could sign up with some domain registrar and use an existing system....
[edit:
ahh nm... hehe the post above is perfect 😃
/]