1. Go to this page and download the library: Download tylercd100/php-rebooter 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/ */
tylercd100 / php-rebooter example snippets
use Tylercd100\Rebooter\Drivers\Api\Linode;
use Tylercd100\Rebooter\Drivers\Api\DigitalOcean; // DigitalOcean takes the same parameters as Linode
use Tylercd100\Rebooter\Drivers\Api\Vultr; // Vultr takes the same parameters as Linode
$token = "secret";
$server_id = 1234;
$server = new Linode($token,$server_id);
$server->reboot();
# or $server->boot();
# or $server->shutdown();
use Tylercd100\Rebooter\Drivers\Ssh\Password;
$host = "your-server.com";
$user = "your-username";
$pass = "your-secret-password";
$port = 22; // The port parameter is optional and will default to 22
$server = new Password($host,$user,$pass,$port);
$server->reboot();
# or $server->shutdown();
# or $server->boot(); // Will not work as you cannot boot a powered down maching using SSH
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.