Re: Re: Domain Search
| From: | Jochem Maas | Date: | Tue, 09 Jan 2007 15:28:39 +0000 |
| Subject: | Re: Re: Domain Search | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246787@lists.php.net to get a copy of this message | ||
Colin Guthrie wrote:
> Marcelo Ferrufino Murillo wrote:
>> I have to make a domain search so I don´t know if there is an API or
>> something that could help me in this o if you know how I could make this.
>
> Should just be a matter of spewing out the results of the command "whois
> mydomain.com".
>
> There may be a specific PHP module for it but otherwise I'd just do
> something like:
>
> passthru('whois '.shell_escape_cmd($_GET['domain']));
without getting into the specifics of what the OP might be looking for,
I'd like to add that I think the above should (?) use escapeshellarg() rather
than escapeshellcmd() although escapeshellcmd() will, AFAICT from the docs,
also keep you safe in the current example.
>
> Perhaps with extra sanity and correctly named functions if I've got them
> wrong :p
>
> Col.
>