PHP code example of lamoni / jsnapcommander
1. Go to this page and download the library: Download lamoni/jsnapcommander 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/ */
lamoni / jsnapcommander example snippets
$commander = new JSnapCommander(
new JSnapTriggerDriverShell(
new JSnapConfigTriggerShell(
array(
'JSnapExecutable' => '/vagrant/junos-snapshot-administrator/bin/jsnap',
'ConfigFile' => '/vagrant/junos-snapshot-administrator/jsnap/samples/sample.conf',
'JuiseExecutable' => '/usr/jawa/bin/juise',
'SwapPath' => '/var/www/html/swap/',
'DeviceUsername' => 'root',
'DevicePassword' => 'Juniper'
)
)
),
new JSnapIODriverFiles(
new JSnapConfigIOFiles(
array(
'SwapPath' => '/var/www/html/swap/'
)
)
)
);
$commander->snapShot('192.168.33.11');