PHP code example of updaterbot / runcloud-sdk

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

    

updaterbot / runcloud-sdk example snippets




$runcloud = new OnHover\RunCloud\RunCloud('MY_API_KEY', 'MY_API_SECRET');

$response = $runcloud->ping();

$servers = $runcloud->servers();

$serverId = 12345;
$server = $runcloud->server($serverId);

$serverId = 12345;

$data = [
	'type' => 'global',
	'port' => '8080-8081',
	'protocol' => 'tcp',
];

$rule = $runcloud->createFirewallRule($serverId, $data);