Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[HACK] check if ip addy is already in us
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-03-24 15:56:37
Hi all!

Find in account-signup.php: (line 61)

  // check if email addy is already in use
$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where email='$email'"))) or die(mysql_error());

if ($a[0] != 0)

$message = "The e-mail address $email is already in use.";

Add after:

  // IP check | by: wolfnet | 2008.01.24
$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where ip='$ip'"))) or die(mysql_error());

if ($a[0] != 0)

$message = "The IP  address (<i>$ip</i>) is already in use.";

demo: [url="http://www.exanova.eu"]http://www.exanova.eu[/url]  :D

EnjoY!

wolfnet
Unknown User
2008-03-27 17:47:25
I tried it for 2 days and noone can signup

not working for me
Unknown User
2008-03-27 19:37:13
the one in the premium section works
Unknown User
2008-08-16 14:41:48
"wolfnet, post: 40461":
Add after:

  // IP check | by: wolfnet | 2008.01.24
$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where ip='$ip'"))) or die(mysql_error());

if ($a[0] != 0)

$message = "The IP  address (<i>$ip</i>) is already in use.";

Thank you, but I have a small problem, the ip is not displayed in the sentence.

What should be changed please?

Quote:
$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where ip='$ip'"))) or die(mysql_error());if ($a[0] != 0)

$message = "The IP  address (<i>$ip</i>) is already in use.";
Unknown User
2008-08-16 17:56:05
Add

$ip = $_SERVER["REMOTE_ADDR"];

before the query.
Unknown User
2008-08-16 18:04:26
"Phoenix_UK, post: 45609":
Add$ip = $_SERVER["REMOTE_ADDR"];

before the query.
Thank you very much for your answer, it works now    :blink: .
Unknown User
2008-08-28 09:18:55
:blink: Thanks Phoenix :blink:
Unknown User
2008-08-28 17:18:11
Oops since I put it, any member can not register, whenever it is said that the ip is already in use, I am therefore obliged to withdraw for the time being.

Why do I have this problem? It works with you?
Unknown User
2008-10-03 14:00:36
"Phoenix_UK, post: 45609":
Add$ip = $_SERVER["REMOTE_ADDR"];

before the query.

not understand this code not wokring i not sign up

please full code complete
Unknown User
2008-10-03 16:21:51
Dalibor, this what they mean and this is what it's suppose to look like:

$ip = $_SERVER["REMOTE_ADDR"];

$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where ip='$ip'"))) or die(mysql_error());

if ($a[0] != 0)

$message = "The IP address (<i>$ip</i>) is already in use.";





This is the query that they were talking about



$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where ip='$ip'"))) or die(mysql_error());

if ($a[0] != 0)

$message = "The IP address (<i>$ip</i>) is already in use.";[
Unknown User
2009-10-31 03:37:42
Thanks is work Perfect for me ... :lol:
Unknown User
2011-09-29 04:59:28
thats cool.thanks for share.:angry:
Unknown User
2012-02-27 08:13:18
i think this mod is not ok in 2.08.

$ip = $_SERVER["REMOTE_ADDR"];

$a = (@mysql_fetch_row(@SQL_Query_exec("select count(*) from users where ip='$ip'")));

if ($a[0] != 0)

$message = "The IP address (<i>$ip</i>) is already in use.";
Unknown User
2012-02-27 14:54:58
2.08 ok



//check if IP is already a peer

if ($site_config["ipcheck"] && $site_config["accountmax"] >= "1") {

$ip = $_SERVER['REMOTE_ADDR'];

$ipc = SQL_Query_exec("SELECT COUNT(ip) FROM users WHERE ip = '$ip'");

$ipq = mysql_result($ipc, 0);

if ($ipq >= $site_config["accountmax"]) {

 show_error_msg("Erreur", "<font color=white >$site_config[sITENAME] autorise seulement $ipq compte par utilisateur.<br>Si vous voulez créer un nouveau compte, merci de contacter l'administrateur.</font><br><br><font color=red> La limite pour l'ip : $ip a été atteinte.</font><br><br><font color=white > L'enregistrement a donc échoué. </font><br><a  style="cursor: pointer;cursor:hand;" href="account-login.php"><font color=red>Cliquer ici pour retourner à la page de connexion</font></a>", 1);

}

}






config.php add







$site_config["ipcheck"] = true; // Enable/disable

$site_config["accountmax"] = 1; // max number of accounts

Unknown User
2012-02-27 15:20:31
in 2.07+ i had the below code and its ok, are you sure is 2 in the end?

}

}

//check if IP is already a peer

if ($site_config["ipcheck"] && $site_config["accountmax"] > "0") {

$ip = $_SERVER['REMOTE_ADDR'];

$ipc = SQL_Query_exec("SELECT COUNT(ip) FROM users WHERE ip = '$ip'");

$ipq = mysql_result($ipc, 0);

if ($ipq >= $site_config["accountmax"])

show_error_msg("Error","$site_config[sITENAME] only allows $site_config[accountmax] account per IP. If you would like to create a new account, please contact a staff member via MAIL.<br><br> The error was: <font color=red>maximum account count($site_config[accountmax]) exceeded for $ip($ipq), cannot proceed with signup.</font>",1);

}


but i test it and dont work. maybe because i have a problem as you see in [url="https://www.torrenttrader.org/topic/16451-ip-address/page__pid__80868#entry80868"]https://www.torrentt...0868#entry80868[/url]
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728