PHP code example of tnhnclskn / ilkbyte-php

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

    

tnhnclskn / ilkbyte-php example snippets


use Tnhnclskn\Ilkbyte\Ilkbyte;

$ilkbyte = Ilkbyte::create();

use Tnhnclskn\Ilkbyte\Ilkbyte;

$ilkbyte = Ilkbyte::create([
    'access_key' => 'xxxxxxxxx',
    'secret_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
]);

$response = $ilkbyte->test();

var_dump($response);

$response = $ilkbyte->account();

var_dump($response);

$response = $ilkbyte->accountPayment();

var_dump($response);

$response = $ilkbyte->serverList();

var_dump($response);

$response = $ilkbyte->serverList();

var_dump($response);

$response = $ilkbyte->serverListAll();

var_dump($response);

$response = $ilkbyte->serverCreate();

var_dump($response);

$osId = 14;
$appId = null;
$packageId = 5;
$response = $ilkbyte->serverCreateConfig('root', 'password', 'exampleserver', $osId, $appId, $packageId, 'ssh-rsa [YOUR-SSH-PUBLIC-KEY]');

var_dump($response);

$sunucu = $ilkbyte->server('exampleserver');

$response = $sunucu->show();

var_dump($response);

$response = $sunucu->monitor();

var_dump($response);

$response = $sunucu->power('reboot');

var_dump($response);

$response = $sunucu->rdns('89.252.xxx.xx', 'ni.net.tr');

var_dump($response);

$response = $sunucu->snapshots();

var_dump($response);

$snapshotId = 1234;
$response = $sunucu->snapshotRevert($snapshotId);

var_dump($response);

$response = $sunucu->backups();

var_dump($response);

$backupId = 1234;
$response = $sunucu->backupRevert($backupId);

var_dump($response);

$response = $ilkbyte->domainList();

var_dump($response);

$response = $ilkbyte->domainCreate('ni.net.tr');

var_dump($response);

$alanadi = $ilkbyte->domain('ni.net.tr');

$response = $alanadi->show();

var_dump($response);

$response = $alanadi->add('server1', 'A', '89.252.xxx.xx');

var_dump($response);

$recordId = 1234;
$response = $alanadi->update($recordId, '89.252.xxx.xx');

var_dump($response);

$recordId = 1234;
$response = $alanadi->delete($recordId);

var_dump($response);

$response = $alanadi->push();

var_dump($response);
bash
composer