TTL & Comments on Create Domain

#6 · closed · 2 comments

View on GitHub ↗

ghost

I've added comment and TTL on the create domain function. I've included the code, hope it helps! :) ``` public function create_domain($name = false, $email = false, $comment = false, $ttl = 3600, $records = array(), $showDetails = false) { if (! $email || ! $name ) { return false; } $postData = array ( 'domains' => array ( array ( 'name' => $name, 'emailAddress' => $email, 'ttl' => $ttl, 'comment' => $comment, 'recordsList' => array ( 'records' => $records ) ) ) ); $url = '/domains'; $url .= $showDetails == true ? '?showDetails=true' : ''; $call = $this->makeApiCall ( $url, $postData, 'POST' ); //@todo make callback function to cycle through registered call backs $timeout = time () + self::TIMEOUT; while ( $call ['status'] == 'RUNNING' && $timeout > time () ) { $this->callbacks [] = $call; usleep ( self::SLEEPTIME ); $url = explode ( 'status', $call ['callbackUrl'] ); $url = array_pop ( $url ); $url .= $showDetails == true ? '?showDetails=true' : ''; $call = $this->makeApiCall ( '/status' . $url ); } return $call; } ```

Comments

Snider

Hiya, Thanks for getting in touch with that update. i have modified the code with your changes and updated hithub. Thanks again for helping. Paul

ghost

No Problem at all. Glad I could help! Thanks again for your hard work! It's saved me a ton of time! :) Thank you, _Bobby Bush_ http://indesignfirm.com p::803.233.2713 On Thu, Mar 29, 2012 at 10:34 AM, Paul Lashbrook < [email protected] > wrote: > > Hiya, > > Thanks for getting in touch with that update. > > i have modified the code with your changes and updated hithub. > > Thanks again for helping. > > Paul > > --- > > Reply to this email directly or view it on GitHub: > https://github.com/snider/php-cloudDNS/issues/6#issuecomment-4821305