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

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$14
Force download script, needs some WP love

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 download photo button for a photoblog site. Visitors can open a full size image in the browser, hence the need for the download script.

script url: http://davidwalsh.name/php-force-download

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)

This question has been answered.

attachment image View Attachment

Matt Taylor | 11/07/11 at 10:27am Edit


The experts have suggested, on average, a prize of $62 for this question.

(3) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    11/07/11
    10:59am
    Julio Potier says:

    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

    ps : i'm already coding it in case of ...

    • 11/07/11 11:03am

      Matt Taylor says:

      Can we do it for $40?

    • 11/07/11 11:06am

      Julio Potier says:

      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 ;)

    • 11/07/11 11:12am

      Matt Taylor says:

      No worries. Thanks Julio!

  • avatar
    Last edited:
    11/07/11
    3:08pm
    Clifford P says:

    $40 for a custom plugin sounds like a deal to me, but have you checked out http://wordpress.org/extend/plugins/download-monitor/? 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.)

    Previous versions of this answer: 11/07/11 at 3:08pm

  • avatar
    Last edited:
    11/08/11
    6:22am
    Jarret Minkler says:

    "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?

    • 11/08/11 8:33am

      Matt Taylor says:

      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.

This question has expired.



Gabriel Reguly, Matt Taylor, Luis Abarca voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.