whois-api-client

This is a simple whois client, with registrar API support, that can be run from any web server to obtain domain details. You can also use this from various Domain Name Management Products available from DomainPunch.Com.

This is very useful in cases when you want to manage your own domain names, but can't access the port 43 whois data because of limitations set by the registrar.

The API will work only for domains registered under your authenticated profile of the supported registrars. In other cases the script will fall back to the default port 43 whois.

Cloud Server Tools for Domain Management

This is the first in a series of cloud server tools for domain name search and management through registrar APIs. We plan to support a large number of registrars.

API Support

The Whois API Client script currently supports the following registrar APIs.

  1. GoDaddy: whois server whois.godaddy.com
  2. ResellerClub: whois server whois.publicdomainregistry.com
  3. Dynadot: whois server whois.dynadot.com

We will add more registrar APIs soon.

Before you start, you will need to obtain the various API keys and configure the IP addresses that will connect to the API. You can do this from your registrar's web interface.

Requirements

Web Server, PHP 5.4 and above with Curl

Installation

  1. Download the ZIP file (apiwhois.zip) and unzip into a folder. Copy the

    whois/config-sample.php

    file to config.php in the same folder and open it any text editor. Add the various API keys obtained from your registrar.
  2. Upload the entire contents to a web folder.
  3. Access the script from a browser like so...

    https://yourdomain/path/web-api-client.php?d=example.com

    and check that it works.
  4. Use it to lookup the domains you have registered at one of the API supported registrars. You can do this by specifying the default whois server for that registrar. For example,

    https://yourdomain/path/web-api-client.php?d=godaddy.com&s=whois.godaddy.com

    This will work only if the domain is registered at GoDaddy under your profile. If not, it will fall back to the default port 43 lookup.

Add API Keys

Using the API Script in DomainPunch.Com products

Once everything is working fine you can enable the proxy settings in Domain Punch Pro or Watch My Domains by specifying the URL. For example, for whois.godaddy.com, the proxy URL will be

https://yourdomain/path/web-api-client.php?d={D}&s=whois.godaddy.com

The application (Domain Punch Pro / Watch My Domains) will replace the {D} with the actual domain name when the URL is invoked.

Please see the sample GoDaddy script at DomainPunch.Com for more details. You should probably use this script instead of the one in that page because this one supports more registrar APIs.

Simple Authentication

You can enable a simple authentication to prevent unauthorized access to your script by adding a key in the config.php file.

For example, you can set

$api_whois_access_key = "bnRtwe78";

and then access the URL as

https://yourdomain/path/web-api-client.php?d=godaddy.com&s=whois.godaddy.com&k=bnRtwe78

Please use the script on an SSL enabled site if you are using a key.

  • Currently Supports...
  • GoDaddy
  • ResellerClub
  • Dynadot

Download