PHP code example of foogile / nb-remote-phpunit

1. Go to this page and download the library: Download foogile/nb-remote-phpunit 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/ */

    

foogile / nb-remote-phpunit example snippets


class SSHRemoteHost implements RemoteHostInterface
{
    public public put($localPath, $remotePath)
    {
        exec("scp $src myhost.com:$dst");
    }
    
    public function get($remotePath, $localpath)
    {
        exec("scp myhost.com:$remotePath $localPath");
    }

    public function delete($remotePath)
    {
        exec("ssh myhost.com 'rm $remotePath'");
    }

    public function exec($command)
    {
        exec("ssh myhost.com '$command'");
    }