Ask your WordPress questions! Pay money and get answers fast! (more info)

Force download script, needs some WP love WordPress

  • SOLVED

David Walsh created a simple force download script that will let a visitor download files that the server would otherwise process. I need you to give the script some WP love.

I will be using this script as a <em>download photo</em> button for a photoblog site. Visitors can open a full size image in the browser, hence the need for the download script.

script url: [[LINK href="http://davidwalsh.name/php-force-download"]]http://davidwalsh.name/php-force-download[[/LINK]]

I would like for the script to be modified to do the following things:
a) only allow downloading of jpg file types
b) verify the user is logged in
c) integrate nonce so the link does not last
d) confirm that the download dialog box does not prevent browsing the rest of the site (session control)

Answers (3)

2011-11-07

Julio Potier answers:

I can do this as a plugin, secure, with hook, usable into wordpress, with a shortcode if needed, but not for $14 :/
I suggest $50.
How much can you afford Matt ?

Thank you

<em>ps : i'm already coding it in case of ...</em>


Matt Taylor comments:

Can we do it for $40?


Julio Potier comments:

Ok, i'm on it, i'll send you the code in about ... 5 hours, please bear with me Matt.
See you later/soon !!
ps : i'm web security consultant, i can assure you it will be secure ;)


Matt Taylor comments:

No worries. Thanks Julio!

2011-11-07

Clifford P answers:

$40 for a custom plugin sounds like a deal to me, but have you checked out [[LINK href="http://wordpress.org/extend/plugins/download-monitor/"]]http://wordpress.org/extend/plugins/download-monitor/[[/LINK]]? May or may not be sufficient for your needs.

Julio, will your plugin have a download counter? Where can we all demo/download it when it's complete? ;)

(EDIT: I visited the asker's link and saw there is a download counter. Cool.)

2011-11-08

Jarret Minkler answers:

"I will be using this script as a download photo button for a photoblog site. Visitors can open a full size image in the browser, hence the need for the download script."

Actually, that's not "downloading" it if they are just viewing it in the browser. Are you sure you need this, or a secure photo gallery?


Matt Taylor comments:

Download means that when they click the link the server prompts the user to download the photo as compared to clicking on an image link and opening the file in the browser.