src/Files/SftpFile.php
public function wget($httpFile, $remote)
    {
        if (! ini_get('allow_url_fopen')) {
            throw new \RuntimeException('allow_url_fopen must enabled');
        }
        if (! $fileData = file_get_contents($httpFile)) {
            throw new \RuntimeException('Can nat get file content');
        }
        $parseFile = $this->parseLastDirectory($remote);
        if (! file_put_contents($this->getWrapper("/$parseFile"), $fileData)) {
            throw new FileException('File not uploaded to ftp server');
        }
        return true;
    }
public function wget($httpFile, $remote)
    {
        if (! ini_get('allow_url_fopen')) {
            throw new \RuntimeException('allow_url_fopen must enabled');
        }
        if (! $fileData = file_get_contents($httpFile)) {
            throw new \RuntimeException('Can nat get file content');
        }
        $parseFile = $this->parseLastDirectory($remote);
        if (! file_put_contents($this->getWrapper("/$parseFile"), $fileData)) {
            throw new FileException('File not uploaded to ftp server');
        }
        return true;
    }
public function wget ( $ httpFile , $ remote ) { if ( ! ini_get ( 'allow_url_fopen' ) ) { throw new \ RuntimeException ( 'allow_url_fopen must enabled' ) ; } if ( ! $ fileData = file_get_contents ( $ httpFile ) ) { throw new \ RuntimeException ( 'Can nat get file content' ) ; } $ parseFile = $ this -> parseLastDirectory ( $ remote ) ; if ( ! file_put_contents ( $ this -> getWrapper ( "/$parseFile" ) , $ fileData ) ) { throw new FileException ( 'File not uploaded to ftp server' ) ; } return true ; }
Upload file to ssh server from http address

@access public
@param string $httpFile http file name with address
@param string $remote file name to upload ssh server
@return boolean true if success
@throws FileException|RuntimeException
Upload file to ssh server from http address