PHP code example of jouwweb / openprovider-php
1. Go to this page and download the library: Download jouwweb/openprovider-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jouwweb / openprovider-php example snippets
$api = new OP_API ('https://api.openprovider.eu');
$request = new OP_Request;
$request
->setCommand('checkDomainRequest')
->setAuth(array('username' => '[username]', 'password' => '[password]'))
->setArgs(array(
'domains' => array(
array(
'name' => 'openprovider',
'extension' => 'nl'
),
array(
'name' => 'jouwweb',
'extension' => 'nl'
)
)
));
$reply = $api->setDebug(1)->process($request);
echo "Code: " . $reply->getFaultCode() . "\n";
echo "Error: " . $reply->getFaultString() . "\n";
echo "Value: " . print_r($reply->getValue(), true) . "\n";
echo "\n---------------------------------------\n";
echo "Finished example script\n\n";