This documentation has moved

XML API documentation can now be found at developer.openprovider.com. This page will remain available until September 2026, but will no longer be updated.

The XML API itself is not changing. Your existing integration continues to work.

Bulk transferDomainRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
WikiSysop (Talk | contribs)
(Created page with ' <?php require_once('API.php'); $api = new OP_API('https://api.openprovider.eu'); $username = '--'; $password = '--'; $domains = array('name1,tld,auth','name2,tld,auth',…')
Newer edit →

Revision as of 13:49, 9 February 2015

<?php
require_once('API.php');
$api = new OP_API('https://api.openprovider.eu');

$username = '--';
$password = '--';

$domains = array('name1,tld,auth','name2,tld,auth','name3,tld,auth');

foreach ($domains as $domain) {
   
   $domainexploded = explode(",", $domain);
   
   $request = new OP_Request;
   $request->setCommand('transferDomainRequest')->setAuth(array(
       'username' => $username,
       'password' => $password
   ))->setArgs(array(
       'domain' => array(
           'name' => $domainexploded[0],
           'extension' => $domainexploded[1]
       ),
       'authCode' => $domainexploded[2],
       'period' => '1',
       'ownerHandle' => '--',
       'adminHandle' => '--',
       'techHandle' => '--',
       'nsGroup' => 'dns-openprovider',
       'nsTemplateName' => 'Default'
       )
   ));
   
   echo "Starting transfer for: " . $domain . "\n";
   $reply = $api->process($request);
   echo "Result (0 means no error): " . $reply->getFaultString() . "\n";
}

?>
Views
Personal tools