Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

PHP rate limit

Options
  • 19-08-2009 11:41pm
    #1
    Posts: 5,589 ✭✭✭


    Right, total newbie to all this so be nice!! Google failed me so I need a bit of help.

    I want to limit the amount of times that a user on a site can access some pages where the user can update a file in a MySQL DB. To this extent I had planned to write a php include that sends the output of <? time() ?> to a table in the DB whenever a user executes one of these update scripts using REPLACE.

    I then include a file in the page which allows execution of an update script which subtracts the current value from <? time() ?> from the stored value and redirects the user to an error page if the difference isn't large enough.

    I was also planning on adding _SERVER to the scripts so that the user must then change IP and username in order to make a series of successive changes.

    Does that sound ok? I'm two weeks into learning PHP so baby talk in the replies (if any!) please!

    Cheers,

    Z


Advertisement