PHP code example of kregel / namecheap-sdk

1. Go to this page and download the library: Download kregel/namecheap-sdk 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/ */

    

kregel / namecheap-sdk example snippets


use Kregel\Namecheap\Api;
use Kregel\Namecheap\Config;

$config = new Config($apiUser, $apiKey, $username, $clientIp);

$client = new Guzzlehttp\Client([
    'base_uri' => Api::ENV_SANDBOX
]);

$api = new Api($config, $client)

$myDomains = $api->domains()
    ->getList();
// Do stuff with my domains.