SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2003
    Location
    USA
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Password Protecting Files

    Hello, new to php and was wondering how i go about protecting a file for download. Iam trying to setup a ebook that people will buy and i got the paypal.php from hostdream but would like to know how i go about protecting the file from people just downloading it. any suggestions would be great

    thanks


    kingx

  2. #2
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    CHMOD it to 644, or put it below the document root
    Mike
    It's not who I am underneath, but what I do that defines me.

  3. #3
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by naramation
    CHMOD it to 644, or put it below the document root
    isn't that what things like image files are? i think you mean chmod 600.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  4. #4
    SitePoint Enthusiast LudicrousSpeed's Avatar
    Join Date
    Feb 2003
    Location
    Chicago
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't used this specifically for file downloads, but I use .htaccess to password protect directories, obviously everything in them. If your .htpasswd file is in your root directory, then no one can hack into it from the web. You can create a username/password for each user in the .htpasswd file and have links to each file in the protected directory. Just a thought...

  5. #5
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DR_LaRRY_PEpPeR
    isn't that what things like image files are? i think you mean chmod 600.

    Yes yes, I got mixed up :0 Just put it below the doc root anyways, then you don't need to fumble with numbers
    Mike
    It's not who I am underneath, but what I do that defines me.


Bookmarks

Posting Permissions

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