ONLamp.com: Allowing Registration-Required Binary Downloads
ONLamp.com: Allowing Registration-Required Binary Downloads
… something that can be done very simply with PEAR::HTTP_Download
[code]
$dl = &new HTTP_Download();
$dl->setFile(’../hidden/download.tgz’);
$dl->setContentDisposition(HTTP_DOWNLOAD_ATTACHMENT, ‘latest.tgz’);
$dl->setContentType(’application/x-gzip’);
$dl->send();
This will send the zipped files latest.tgz, in the example of course you or you can name that file what you like. You can also send arbritrary data (from the db) and throttle your download to conserve bandwidth.
Articles like this are interesting, but make a lot more work than is really needed.



May 13th, 2007 at 9:38 am
MSN I NIIPET
MSN