Re: Whois Script with a twist
| From: | Matt McClanahan | Date: | Sat, 15 Jul 2000 20:25:41 +0000 |
| Subject: | Re: Whois Script with a twist | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6773@lists.php.net to get a copy of this message | ||
On Sat, 15 Jul 2000, Vispa Admin wrote:
> Can anyone point me in the right direction for a whois script that does
> the following.
>
> 1) Searches all the main TLD's....including .uk etc
> 2) If a domain has already been brought, then it displays details of who
> owns it.
> 3) If domain is still available it displays message "click here to
> purchase". etc which goes off to a purchase screen, where i can echo out
> domain name into a form.
>
> All whois scripts Do 1) and 2) but I can't for the life of me find one
> that does 3). I attempted for over a week to write my own, but I have
> not got quite enough skills yet to perform such a function.
The reason it's difficult to do this and still keep functions 1 and 2 is
that quite often, registrars for the various TLD's display totally
different output. Function 2 isn't actually doing any processing, it's
simply outputting the server response. The only way to accomplish 3 with
just the whois protocol, for all TLD's, would be to know ahead of time the
format for every registrar being used in the search, which would suck to
write. You could make assumptions, for example, key in on phrases like
"not available", "already taken", "no match for", etc. But it's
guesswork, and wouldn't be useful on a production site.
Matt