PHP code example of inwx / domrobot

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

    

inwx / domrobot example snippets


use INWX\Domrobot;



error_reporting(E_ALL);
assword = 'your_password';

$domrobot = new \INWX\Domrobot();
$result = $domrobot->setLanguage('en')
    ->useOte()
    ->useJson()
    ->setDebug(true)
    ->login($username, $password);

if ($result['code'] == 1000) {
    $object = 'domain';
    $method = 'check';
    $params = ['domain' => 'mydomain.com'];

    $result = $domrobot->call($object, $method, $params);
}

print_r($result);

$domrobot->logout();