Jump to content

[SOLVED] $_SERVER['REMOTE_ADDR'] and validation, for db insert


Lodius2000

Recommended Posts

what type of validations can I do on $_SERVER['REMOTE_ADDR']... I am thinking of putting a new user ip in my users table on my db for banning purposes, and dont know what I should validate.

 

that is other than a regex validation to make sure it is the right format

Link to comment
Share on other sites

so is username the best ban method... just have to stay on top of it that way, or is there a better way to ban a person so that they cant continue register accounts// I am thinking would be a ban table that has usernames and ips, and say more than 3 usernames banned with the same ip and the ip is now banned, chances of 3 people from the same office being banned are much slimmer than one a-hole spamming/offending like crazy and continuing to register accounts for free

Link to comment
Share on other sites

Welcome to world of Websites. You can ban a username, but what keeps them from creating a new account. You can ban the email addr, but whats to stop them from changing emails. You can ban an IP but what is to stop them from logging on via a different location or creating a new account different location or even just using a proxy. You could set a cookie on their computer, but once they clear cookies they are allowed back in...

 

Just ban the username, and hope they are not smart enough to get around the ban. If they are, well you just keep on banning. Not much help, but that is where it lays, you are stuck between a rock and a hard spot with everyone else.

Link to comment
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.