1. Go to this page and download the library: Download utopia-php/domains 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/ */
use Utopia\Domains\Registrar;
use Utopia\Domains\Registrar\Contact;
use Utopia\Domains\Registrar\Adapter\OpenSRS;
$opensrs = new OpenSRS(
'apikey',
'username',
'password',
[
'ns1.nameserver.com',
'ns2.nameserver.com',
],
'https://horizon.opensrs.net:55443' // or 'https://rr-n1-tor.opensrs.net:55443' for production
);
$reg = new Registrar($opensrs);
use Utopia\Domains\Registrar;
use Utopia\Domains\Registrar\Contact;
use Utopia\Domains\Registrar\Adapter\NameCom;
$namecom = new NameCom(
'username',
'api-token',
[
'ns1.name.com',
'ns2.name.com',
],
'https://api.name.com' // or 'https://api.dev.name.com' for testing
);
$reg = new Registrar($namecom);