PHP code example of haldayne / fox
1. Go to this page and download the library: Download haldayne/fox 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/ */
haldayne / fox example snippets
$retry = new \Haldayne\Fox\Retry(
function ($src, $dst) { return copy($src, $dst); }
);
$retry->setAttempts(3);
$retry('ssh2.sftp://user:pass@host/the/file', 'thefile')
or die("Copy failed after {$retry->getAttempts()} attempts");