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.

One Response to “ONLamp.com: Allowing Registration-Required Binary Downloads”

  1. Bill Says:

    MSN I NIIPET
    MSN

Leave a Reply