Jump to content

Recommended Posts

After thinking about this some more, I'm thinking of going with a suspension system. Where they get suspended for a day or two, and when they come back if they get suspended again then they're suspended a bit longer this time. It just keeps going up a few times then it just permanently bans them from my website.. so I'm guessing that I have to do that sql query on every page load right?

 

Is that going to be the least bit stressful on the server?

Link to comment
https://forums.phpfreaks.com/topic/159965-creating-a-banlist/#findComment-843783
Share on other sites

if the user are login in you can have field in the member table ban_del... then when the user logs in check to see if the ban_del field has a 1 (yes) if so then redirect the user to a ban page and you can re-log there IP so if they attempt to create another account you can flag it. Another security measure you could use is to set a cookie so if there IP changes the cookie would know that they're banned. I use all 3 of those methods which stop 99% of banned users for my site from attempting to create another account. An experienced user can easily get around those methods but I just have a community site and I doubt anyone would waste there time trying to get back on my site.

Link to comment
https://forums.phpfreaks.com/topic/159965-creating-a-banlist/#findComment-843801
Share on other sites

I have to do that sql query on every page load right

Yes, if you want your system to enforce a change in the user's status (suspended/banned...) on any page request.

 

Would that cause much stress on the server doing that though even if there's a few hundred people on at once.

Link to comment
https://forums.phpfreaks.com/topic/159965-creating-a-banlist/#findComment-843865
Share on other sites

I have to do that sql query on every page load right

Yes, if you want your system to enforce a change in the user's status (suspended/banned...) on any page request.

 

Would that cause much stress on the server doing that though even if there's a few hundred people on at once.

actually surprisingly it doesn't... sql queries are exteremly fast depending on how they're written and if you're not doing a wildcard of everything. i've done queries of over 10,000+ records and it only takes .5secs or less.. so no worries

Link to comment
https://forums.phpfreaks.com/topic/159965-creating-a-banlist/#findComment-843879
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.