How can I limit a certain resource in PHP to run after a certain amount of time defined by me?
Example:
I have a button, I click on it and it sends 50 users to a field named count
in my table, and also seto a time in a field called timer
which I would like to have been 20 minutes. And after 20 minutes it resets the count to 0 and the timer also returns 0!
I've had experiences with events in MySQL, but I do not want to use them for obvious reasons.
My table looks like this:
'id' int(11) NOT NULL AUTO_INCREMENT,
'id_str' varchar(255) NOT NULL,
'screen_name' varchar(255) NOT NULL,
'oauth_token' varchar(255) NOT NULL,
'oauth_token_secret' varchar(255) NOT NULL,
'vip' int(11) NOT NULL DEFAULT '0',
'days' int(11) NOT NULL DEFAULT '0',
'count' int(11) NOT NULL DEFAULT '0',
'timer' int(11) NOT NULL DEFAULT '0',
What is the logic? does PHP provide some native function for this? I do not want to use cookies
nor sessions
for security reasons I want PHP
and MySQL
to work in my favor.