Are you sure you want to close the chat?Chat will be closed and the chat history will be cleared.
continue to sign out,
or stay on chat.
To review this chat session please click this windows.
Chat Online
Chat Online0
Support

Forum

A place for Dynadot and community experts alike to ask questions, share ideas, and more.
Another Dynadot API implementation (PHP) - search and register domain names
Posted By kate
10/26/2007 12:48
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 ;-)

Now that you've been warned the script can be downloaded here (.zip file):
http://zonescripts.com/projects/dynadot-api.zip

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.]
Reply Quote
10/26/2007 14:58
Thank you for posting this, kate.
Reply Quote
10/27/2007 07:14
Awesome job, Kate.
Reply Quote
Posted By kate
11/11/2007 09:14
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.

Version 0.6 available here for download: http://zonescripts.com/projects/dynadot-api-0.6.zip

Disclaimer: as usual I do not guarantee that the code will perform as expected or that it will not crash your server
etc etc


[This post has been edited by kate on Nov 11, 2007 9:15am.]
Reply Quote
11/17/2007 07:00
Thank you so much Kate!

Best Regards,
Jamal.
Reply Quote
1/7/2008 01:25
respect
Reply Quote
1/31/2008 22:06
Hi,
I want to try kate's script. But I don't downloading.

Could you send new link ? Please
Reply Quote