Jamescool12
Member
- Jan 17, 2014
- 139
- 13
Hello I have alot of boosters and how do I make it where only per IP can register ? If you know please write down in the comments thank you!
$ip = $_SERVER['REMOTE_ADDR'];
$accounts = $sql->query("SELECT id FROM users WHERE ip_last = '$ip' or ip_reg = '$ip'")->num_rows;
if($accounts > 0) {
// Abort Registration
} else {
// Continue registration
}
Where do I find the registerion script ?PHP:$ip = $_SERVER['REMOTE_ADDR']; $accounts = $sql->query("SELECT id FROM users WHERE ip_last = '$ip' or ip_reg = '$ip'")->num_rows; if($accounts > 0) { // Abort Registration } else { // Continue registration }
You need to do a check in your registration script. Please be aware, this is a simple solution. Nowadays anybody can change his IP in a couple of seconds, so you need other methods as well.