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
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 [url]https://www.dynadot.com/account/domain/setting/api.html[/url]) - the CURL extension on your server (if unsure check with phpinfo) [b]Configuration[/b] Open file dynadot.class.php. There is a section which reads: [color=#003399] /* 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 ! [/color] Enter your own API key and save the file. [b]Remarks[/b] 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 [b]AS-IS[/b]. 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): [url]http://zonescripts.com/projects/dynadot-api.zip[/url] 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 [b]Warning[/b] 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.]
teamdynadot replied kate
Thank you for posting this, kate.
Reply Quote
0 Replies
kewlceo replied kate
Awesome job, Kate.
Reply Quote
0 Replies
kate replied kate
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: [url=http://zonescripts.com/projects/dynadot-api-0.6.zip]http://zonescripts.com/projects/dynadot-api-0.6.zip[/url] 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
0 Replies
jamal_jo replied kate
Thank you so much Kate! Best Regards, Jamal.
Reply Quote
0 Replies
k_osaka_jp replied kate
respect
Reply Quote
0 Replies
m_a_ankara_tr replied kate
Hi, I want to try kate's script. But I don't downloading. Could you send new link ? Please
Reply Quote
0 Replies