Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Iowa City, IA
    Thanked 5 Times in 5 Posts

    password protect a file


    I would like to use php to allow access to a file only when a person pays me for access. sort of like when you visit a microsoft website and when you download one of their files, they have strange names like "j8eiw098l.exe". can someon point me in the right direction of how to store files in a secure place (as in not accessible by typing in the URL directly), and then provide access to them on a password protected basis?

    I know how to password protect a web page content, but that is not the same as protecting a URL to a file directly...

  • #2
    Master Coder
    Join Date
    Jun 2003
    Cottage Grove, Minnesota
    Thanked 1,096 Times in 1,087 Posts
    What is the filetype (.mp3, .jpg, .pdf, etc.) ?

    You posted in PHP, so I assume you already know you'll use PHP to do this.
    It will also involve a lot of other things, like a credit card gateway (for payment),
    some IPN transactions (so you know they paid for it).

    If you were to install something like CubeCart, you would have all of that already
    done for you. It's free, and you can set it to work with tangible items or file


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts