how to use a pear package!?
- by Naughty.Coder
I want to use HTTP_DOWNLOAD to manage my downloads ,, I have never used PEAR before !!
HTTP_DOWNLOAD depends on many other packages , I downloaded them and the ones they , in turn , depend on and this is the structure I made :
Download.PHP <---HTTP_DOWNLOAD MAIN FILE
Header.php <--- HTTP_HEADER MAIN FILE
PEAR.php
PEAR5.php
Type.php <--- MIME_Type
>Type <---- FOLDER
- Extension.php MIME_Type File
- Parameter.php MIME_Type File
assuming that Http_DOWNLOAD depends on :
* PHP 4.2.0
* PEAR 1.4.0b1
* PEAR
* HTTP_Header
* pcre extension
* Archive_Tar (Optional)
* Archive_Zip (Optional)
* MIME_Type (Optional)
* mime_magic extension (Optional)
* pgsql extension (Optional)
and I edited the paths inside each file to reflect this structure , and I tried to run the following code :
<?php
require_once 'Download.php';
$params = array('file'=>'file.zip');
$down = new HTTP_Download($params);
$down->send(true);
?>
nothing happens !!
I also got a hard time trying to figure how to use the class and I think this code should work .. but not sure !
Help Please !