[REL] 1 User per IP for PHPRETRO [REL]
Hello!
Want to make it possible that only 1 user can register an account per IP? This is smart if your users create tons of multiaccounts just to get credits or something..
Do this:
1. Open register.php
2. Search for this line: require_once('./templates/register_header.php');
3.
The orginal will look like this:
Code:
require_once('./templates/register_header.php');
?>
Replace with this:
Code:
require_once('./templates/register_header.php');
$sql = mysql_query("SELECT * FROM users WHERE ipaddress_last='$_SERVER[REMOTE_ADDR]'");
if(mysql_num_rows($sql) > 0) {
echo "<center><br><br><br>ONLY 1 IP PER USER ALLOWED!";
echo '<meta http-equiv="refresh" content="4; url=index.php"> ';
die;
}
?>
4. Save and replace with the orginal register.php file.
Coded by ZimperZ editet for PHPRetro by qurke (Imagician) Have Fun!
Re: [REL] 1 User per IP for PHPRETRO [REL]
Ty, nice work.
Thanks for sharing ;)
Re: [REL] 1 User per IP for PHPRETRO [REL]
Is there a way for 2 users per IP?
Re: [REL] 1 User per IP for PHPRETRO [REL]
Re: [REL] 1 User per IP for PHPRETRO [REL]
change the 0 to a 1 for 2 users per ip
Re: [REL] 1 User per IP for PHPRETRO [REL]
Re: [REL] 1 User per IP for PHPRETRO [REL]
Quote:
Originally Posted by
robbieelias
change the 0 to a 1 for 2 users per ip
Thanks. :)
I found a way to put the footer, so that i aint a square. xD
Re: [REL] 1 User per IP for PHPRETRO [REL]
Easy Release But i Needed to many Bots xD Thanks + Rep
Re: [REL] 1 User per IP for PHPRETRO [REL]
thanks, this helped me a lot ;)
Re: [REL] 1 User per IP for PHPRETRO [REL]
Re: [REL] 1 User per IP for PHPRETRO [REL]
Re: [REL] 1 User per IP for PHPRETRO [REL]
its exactly the same as the holocms one that CJ released ages ago..
to change the number of users per IP, simply change the conditions of the if statement.
eg.
For 1 User per IP:
if(mysql_num_rows($sql) > 0) {
For 2:
if(mysql_num_rows($sql) > 1) {
For 3:
if(mysql_num_rows($sql) > 3) {
Easy. :)
Re: [REL] 1 User per IP for PHPRETRO [REL]
Well I have the demo of that: http://cmsdemo.tk/
Or CMSdemo.tk
Re: [REL] 1 User per IP for PHPRETRO [REL]
Quote:
Originally Posted by
Hablake
does this work for phpretro?
The title of this thread is "[REL] 1 User per IP for PHPRETRO [REL]" and you are still wondering if it works for PHPRetro...?
You must be very clever!
Re: [REL] 1 User per IP for PHPRETRO [REL]
Lmao Neroez xD People Gotta Learn How To Read.
Uhmm Thank's Creator Of Thread This Helped Alot &
Thank's Andy For Posting How To Change The Amount Of Account's Per IP
One Thread Can Do It All xD