[PHP] Refresh limit..

Experienced Elementalist
Joined
Sep 10, 2006
Messages
208
Reaction score
1
Anybody know how to limit refresh, example after i refresh my site, i can't refresh again until 30second.. How to make that??
 
Re: Refresh limit..

Make a table with unique session ID in a DB, and record the last refresh time...then simply check if the ID exists and has a last refresh time lower then 30 seconds.

Record time as 'time()', and simply check if the current time minus the recorded time is bigger then 30, then refresh is allowed.
 
Back