The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I need help developing password protected directories!

Discussion in 'cPanel Developers' started by irrumate, Jan 4, 2008.

  1. irrumate

    irrumate Registered

    Joined:
    Jan 4, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I am trying to sell downloadable goods and need some directories to be password protected. I know I can use cPanel to password protect some directories, however, I was wondering if it was possible to have a script that would create a username and/or password that would be valid for a certain time and would expire afterward so it wouldn't be possible for someone to pass off the username and/or password. Please help.
     
  2. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    you probably use a proper shopping cart with this feature. It will be a bit of setup, but you'll get something that functions and offers a lot of other features (like reporting). I would advise zen-cart
     
  3. wsenter

    wsenter Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas
    Here is how you could do it as well...

    1. Set up a cron job to run nightly

    2. When you want to add a new password protected directory use either the cpanel plugin to create a password protected directory OR use php curl and create a custom app that adds a password protected directory in cpanel.

    3. Then have the nightly cron job remove the password protected directory via the exact same fashion that it was originally added via step #2.
     
  4. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    As verdon mentioned, many shopping carts include the ability to sell "downloaded goods" that would address your needs. In lieu of that, http://www.locked-area.com/ has some great scripts for managing restricted access to directories.
     
Loading...

Share This Page