- A PHP library to retrieve WHOIS informations
- Retrieving raw WHOIS informations in PHP
- Checking a domain’s availability with PHP
- Y U NO access WHOIS informations in PHP?
This post is part of the ”WHOIS in PHP: consuming the Robowhois API” series; here is a list of all the articles contained this series:
After something more than a week I’m back here with a first implementation of the PHP library I was talking earlier to retrieve WHOIS informations with PHP.
In the first meeting I had with David we just setup the environment (Composer, PHPUnit and so on) and today we’ve release the first tag – 0.7.0 – of Robowhois PHP client, a PHP library to consume Robowhois APIs.
The library is assembled with Composer, so you only need to follow the canonical steps in order to download the required dependencies and use it in your own codebase
1 2 3 4 5
then you can autoload everything through the auto-generated autoloader provided by Composer:
1 2 3
Retrieving raw WHOIS responses
By now we have implemented the most simple API exposed, the
one, which returns the raw WHOIS informations associated to a domain.
You can take a look at the example at
sample/index.php or try it live:
bare in mind that you’ll need to sign for a free API key up at Robowhois website (as far as I remember, they provide 500 free request, but the annual fee for unlimited requests is very cheap).
You can also be a bit more creative than the example above:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
In the next meeting – probably next monday – we will implement the
used to retrieve informations about the client’s account – useful for knowing how many
remaining HTTP requests you have, the
whois:availability API, to check whether a
domain is available or not, and the
whois:record API, identical to the one we
already implemented, but returning a JSON response.
Then… take a look at the issue tracker to stay updated about the state of the project: in the next 3 weeks we should be able to go out with a stable client for y’all.