Website review: Some tricks & Force download for PD...
tutunmayan discovered this in PHP
•10 reviews since Dec 21, 2007
php
•sometricks.com/2006/04/23/download-pdf-jpg-gi...
People who like this website

- down2crazy
Garden Grove

- Tsirhc
Irvine

- RocGaude
California

- emi
Alameda

- galbeno
San Francisco

- AnalogPanda
Sacramento

- 4265060
Tempe

- Bondrake
Chandler

- sleepster
Bountiful

- bradmkjr
Missoula
StumbleUpon is the best way to discover great web sites, videos, photos, blogs and more - based on your interests.
Everything is submitted and rated by the community. Discover, share and review the best of the web!
Reviews of this website

philipnorton42 rated 5 months ago- Possible but extremely unsafe!!

down2crazy rated 5 months ago- From the page ! Very easy to code ! Thanks ! But 1 problem small: the bandwidth will spent double for file size ! But it's ok !

vision-x rated 6 months ago- From the page: "Force download for PDF, JPG, GIF directly from the web browser"

tux86 rated 6 months ago- Extremely unsafe!! Don't use this! Make up your own mind and develop.

thufth rated 6 months ago- From the page: "There is a better method to achieve this with the help of PHP using HEADER and READFILE commands."

compwoman rated 6 months ago- From the page: "There is a better method to achieve this with the help of PHP using HEADER and READFILE commands."

Nystagmus rated 6 months ago- This is a simple and effective way to prompt the user to download a file. Passing a $_GET variable directly into your code is a bad idea without cleaning it first. Will definitely keep this article for a reference.

Justzero rated 7 months ago- Probably should have all the files in a database for the PHP file to read from (and of course make it so no odd queries get through. For example, make it an integer only and if it isn't an integer, do not proceed).

fenderocker rated 7 months ago- good idea, but kinda unsafe. ex. someone could use this to download your .htaccess or other sensitive file (I'm not sure if readfile will parse a php script, so they might even be able to get some of your php source.). You should be careful with this. I would probably implement a white list of files that users could download.