PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a certain script that I only want a person to be able to execute once every 10 minutes.
I can think of some possiblities as to how to set this, but are there any specific functions that can help me in this, and any simple way I can do this?
I was thinking that you do something with MySql where you make a column, then when you start the script you take the time, and send that time to the Mysql database, and then make a check in the script that it only works if the current time is +10 to that stored in the table.
Any suggestions? Help appreciated very much, this is my first time posting here, so I'm sorry if this seems a stupid question.
have a table with a timestamp.
each time a user does it it'll first check the timestamp of he last one. if it's less than 10 min ago return an error. otherwise update the row (which will update the timestamp) and allow the user to do that