initworks / openprovider-php
PHP interface to OpenProvider API
Installs: 49
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 6
pkg:composer/initworks/openprovider-php
Requires
- php: >=5.4
Requires (Dev)
This package is not auto-updated.
Last update: 2025-10-09 05:16:06 UTC
README
This package contains a small PHP interface to make use of the OpenProvider API (https://doc.openprovider.eu/index.php/Main_Page).
NOTE: It's very important to remember that this version is NOT identical to the API listed above. This version is compliant to PSR-2 and PSR-4, and is therefore namespaced accordingly.
Be watchful when following the API docs
Example
require 'vendor/autoload.php'; use OpenProvider\API; use OpenProvider\Request; $api = new API('https://api.openprovider.eu'); $request = new Request(); $request ->setCommand('checkDomainRequest') ->setAuth([ 'username' => '[username]', 'password' => '[password]' ]) ->setArgs([ 'domains' => [ [ 'name' => 'openprovider', 'extension' => 'nl', ], [ '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";