Jump to content

Dynadot API


jotorres1

Recommended Posts

Hi all,

 

I have the need for a script to register domain names, but I can't seem to figure out why it is not working.  Here is what I have:

 

<?php 
public function register_domain($domain){
	$this->domain = $domain;
	$url = API_URL.'?key='.urlencode(API_KEY);
	$url .= "&command=register";
	$url .= "&domain=".$domain;

	$curl_connection = curl_init($url);
	// Setup options for the cURL connection
	curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
    curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
    curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);


	$result = curl_exec($curl_connection);
	echo curl_error($curl_connection);
	curl_close($curl_connection);
}
?>

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/261007-dynadot-api/
Share on other sites

Ok, so you have presented us with a function, and all we know at present is that is is "not working".

 

Do you have more information than that?  Are you encountering an error?  If so, what kind?  What is dynadot?  We need more information if you'd like help with your problem.

 

 

Link to comment
https://forums.phpfreaks.com/topic/261007-dynadot-api/#findComment-1337692
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.