Linkestt
Truth is treason in the empire of lies
- Nov 8, 2013
- 376
- 206
I need the script to limit the accounts that can register per IP address.
I found this code from a rival forum, but when it's entered in my register page the page goes blank (all white).
Is there something missing in the code? If so, please help. Or find the script for me. (y)
Code:
<?php $sql = mysql_query("SELECT * FROM users WHERE ip_last='$_SERVER[REMOTE_ADDR]'");
if(mysql_num_rows($sql) > 0) {
echo '<script type="text/javascript">
<!--
alert ("You can only create 1 account per IP!")
// -->
</script>';
echo '<meta http-equiv="refresh" content="1 url=index.php"> ';
die;
}
?>
I found this code from a rival forum, but when it's entered in my register page the page goes blank (all white).
Is there something missing in the code? If so, please help. Or find the script for me. (y)
Code:
<?php $sql = mysql_query("SELECT * FROM users WHERE ip_last='$_SERVER[REMOTE_ADDR]'");
if(mysql_num_rows($sql) > 0) {
echo '<script type="text/javascript">
<!--
alert ("You can only create 1 account per IP!")
// -->
</script>';
echo '<meta http-equiv="refresh" content="1 url=index.php"> ';
die;
}
?>