Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Automatically Remove specific lines from .htaccess?

I'm working on a website that sells e-books. I already know i'm going to setup a system that orders through pay-pal and pay-pal will send me data through HTTP post that confirms the transaction is complete at which point PHP will add the customer's ip address to the htaccess file for the directory that stores the e-book that was ordered. A link will apear and they can download the e-book.

What I want to know is the best way to remove thier access after a certain amount of time. I think give them 24 hours just in case something goes wrong.

Update:

I'd love to use a database ( I know my SQL) but how do I use that to control folder access?

2 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer
  • Anonymous
    1 decade ago

    Very bad design. Use a database. Delete the entry in the database when the download is successful, or some fixed time after that. (.htaccess isn't there for use as a database.)

Still have questions? Get your answers by asking now.