Monk3h Posted May 29, 2008 Share Posted May 29, 2008 How would i stop people from refreshing on my site? Is there somthing i can put in my header so that if some one does refresh it just redirects them to my index.php page? Some one is chating by refreshing the same page and i need to stop em ASAP. Link to comment https://forums.phpfreaks.com/topic/107894-stop-refreshing/ Share on other sites More sharing options...
Gighalen Posted May 29, 2008 Share Posted May 29, 2008 I assume you meant 'cheating', but you could create a table that would store people's ip addresses and then create a function that would check to see how many times they've been to your site within so much time (use a timestamp), and if its greater than, lets say, 3, you can use a header("Location: http://"); thingie. Link to comment https://forums.phpfreaks.com/topic/107894-stop-refreshing/#findComment-553079 Share on other sites More sharing options...
Monk3h Posted May 29, 2008 Author Share Posted May 29, 2008 But is there a way to just stop people from being able to refresh? Link to comment https://forums.phpfreaks.com/topic/107894-stop-refreshing/#findComment-553082 Share on other sites More sharing options...
Gighalen Posted May 29, 2008 Share Posted May 29, 2008 If you are talking about stoping them from clicking on the little recycle-looking icon in your browser's menu bar, no. There is not. Not with PHP anyways. MAYBE if you got REALLY SUPER fancy with Javascript, you could detect when they click it and return null. I know you can detect stuff like onExit, but I've never seen a refresh-getter-thing, so I honestly don't know. And of course you'd have to get an anti-right click function, though I do not recommened becasue that are soooo flippin annoying. Link to comment https://forums.phpfreaks.com/topic/107894-stop-refreshing/#findComment-553091 Share on other sites More sharing options...
Monk3h Posted May 29, 2008 Author Share Posted May 29, 2008 Yes i ment cheating *i'm high*.. Thanks for the help, i'll see what i can make with Java Script. Link to comment https://forums.phpfreaks.com/topic/107894-stop-refreshing/#findComment-553097 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.