Re: Whois Script with a twist
| From: | Thomas Reinke | Date: | Sun, 16 Jul 2000 04:13:33 +0000 |
| Subject: | Re: Whois Script with a twist | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6796@lists.php.net to get a copy of this message | ||
This might not be as difficult as you think, although it would
be a bit tedious.
The trick is to know up fron which domains you are making
the query of and to be able to get back the result.
So, for example, you have 60 TLD's you might query.
For each TLD, you list
a) The whois server to deal with
b) The phrase to look for if the server doesn't have
a match
While we haven't done part b), we've already done part a)
(albeit not in PHP) for the "world-wide" whois at
http://www.securityspace.com's home page.
Here, you can enter ANY domain (qualified with TLD ending),
and it will tell you the information you need (ok, not
any domain, limited to the top 50 or so most popular
domains).
You can certainly do a similar thing, and just add the
"twist" of doing a parse on the results looking for
a pattern, and if found, generate the form on the page
that allows a user to click through to purchase.
Hope this helps,
Thomas
Matt McClanahan wrote:
>
> 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
------------------------------------------------------------
Thomas Reinke Tel: (905) 331-2260
Director of Technology Fax: (905) 331-2504
E-Soft Inc. http://www.e-softinc.com
Publishers of SecuritySpace http://www.securityspace.com