PHP Classes

File: exampleDownload.php

Recommend this page to a friend!
  Classes of leonardo ramos   Transmission of file   exampleDownload.php   Download  
File: exampleDownload.php
Role: Example script
Content type: text/plain
Description: Download example
Class: Transmission of file
Get and send files from SSH, FTP and HTTP servers
Author: By
Last change:
Date: 15 years ago
Size: 404 bytes
 

Contents

Class file image Download
<?php

/*
 * SSH2 EXAMPLE
 */

include('Download.class.php');

$download = new Download("SSH2");

$download->setConnection('LXGED', "/var/dir/dir2/files/file.txt","user","password","");


    if(
$download->start()) {
       
       
/*
         * The method 'getContent ()' should be called before any HTML.
         */
       
$download->getContent();
       
    } else {
        echo
$download->getExceptions();
    }



?>