OK this is a simple PHP class which implements the two functions currently available with the Dynadot API: - search for domain availability - register domain names
In order to use the API you need: - a web server running PHP - bulk pricing level from Dynadot to gain access to the API - enough funds in your account - set the IP address of the machine that will be used to connect to Dynadot (the URL is https://www.dynadot.com/account/domain/setting/api.html) - the CURL extension on your server (if unsure check with phpinfo)
Configuration
Open file dynadot.class.php. There is a section which reads:
/* API-specific constants */ define("API_URL", "https://www.dynadot.com/api.html"); // API URL (https), requests sent via POST define("API_VERSION", "1.0"); define("API_KEY", "######################"); // => you must provide your own key here !
Enter your own API key and save the file.
Remarks
The script uses the CURL extension and sends requests via POST in SSL. You may need the appropriate SSL libraries (probably any preconfigured Nix box should do). This script is provided to you AS-IS. I do not guarantee the quality of the code, or that it will perform reliably. I do not recommend using that code for dropcatching purpose. This may put a heavy load on Dynadot servers and yours. Besides PHP is too slow for that purpose. This was coded late at night a while ago and I have not really looked back since ;-)
The .zip files contains 4 files: - dynadot.class.php: the class file itself interfacing to the API - class.curl.php: this is a third-party wrapper for CURL - idna_convert.class.php: another third-party class used for IDNs - index.php: a test page which allows you to check domain availability and register domains
Warning
When testing the API I recommend that you register domains that have a grace period and may be refunded within 5 days. For example .com or .net are fine. Other extensions like .eu or .tv may not be refunded. Any registration would be final so be careful.
Now I suggest that you play around with the index.php so it will give you an idea of how to use the API class if you want to customize it or integrate it with your own scripts. Good luck.
[This post has been edited by kate on Oct 26, 2007 12:49pm.]
It looks like Dynadot no longer allows POST requests.
Therefore I have made small changes to my API implementation to use GET requests. Only the class file has been changed but I am including all the files in the package.