Hello and welcome to our community! Is this your first visit?
Register
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
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts

    password protect a file

    all,

    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 mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,378
    Thanks
    8
    Thanked 1,075 Times in 1,066 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
    downloads.


  •  

    Posting Permissions

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