Another Dynadot API implementation (PHP) - search and register domain names Back To: 
 
Forum Index
 >> Engineering Corner

   Search
kate
send a message
Posts: 90
 
Subject: Another Dynadot API implementation (PHP) - search and register domain names Date Posted: Oct 26, 2007 12:48pm
 
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.]
 
dynadot_staff
send a message
Posts: 2022
 
Re: Another Dynadot API implementation (PHP) - search and register domain names (kate) Date Posted: Oct 26, 2007 2:58pm
 
Thank you for posting this, kate.
uberhost
send a message
Posts: 41
 
Re: Another Dynadot API implementation (PHP) - search and register domain names (dynadot_staff) Date Posted: Oct 27, 2007 7:14am
 
Awesome job, Kate.
kate
send a message
Posts: 90
 
Re: Another Dynadot API implementation (PHP) - search and register domain names (uberhost) Date Posted: Nov 11, 2007 9:14am
 
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.]
jamal_jo
send a message
Posts: 175
 
Re: Another Dynadot API implementation (PHP) - search and register domain names (kate) Date Posted: Nov 17, 2007 7:00am
 
Thank you so much Kate!

Best Regards,
Jamal.
k_osaka_jp
send a message
Posts: 2
 
Re: Another Dynadot API implementation (PHP) - search and register domain names (jamal_jo) Date Posted: Jan 7, 2008 1:25am
 
respect
m_a_ankara_tr
send a message
Posts: 3
 
Re: Another Dynadot API implementation (PHP) - search and register domain names (k_osaka_jp) Date Posted: Jan 31, 2008 10:06pm
 
Hi,
I want to try kate's script. But I don't downloading.

Could you send new link ? Please
  
 
Contact Us Price List Privacy Policy Service Agreement UDRP Copyright Complaint Report Spam Whois