chaoswar4u Posted March 5, 2007 Share Posted March 5, 2007 Hi. Im running MCcode V2 and I wish to limit the accounts made by the same IP address. There was a post about such a thing however I think it was for V1 Code as the edits they used didnt work for me unless it was my error. The code in question (Or the code they edited) is $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("Your IP has been banned, there is no way around this. Quote Link to comment Share on other sites More sharing options...
UCC Posted March 5, 2007 Share Posted March 5, 2007 Re: Multi Account Problem. The code you're looking at is for complete IP bans. If you want to block a particular IP completely from your game. Quote Link to comment Share on other sites More sharing options...
vinyl Posted March 6, 2007 Share Posted March 6, 2007 Re: Multi Account Problem. well...this won't get people who use proxies, AOL dialup, and a hundred other reasons -but it'll get you started. I would think another table as an array would be another good step to work on. under the multireferral section of register.php I suppose: // multi IP trap .. test $a=mysql_query("SELECT * FROM users WHERE lastip='$ip'",$c); if(mysql_num_rows($a) > 0) { event_add(1,"{$ip}:{$_POST['username']} attempted to register under an existing IP.",$c); die("Accounts playing from the same IP address must be approved and set-up by a game admin. Please contact [email][email protected][/email] via non-game-mail, or ID #1 via in-game mail from the other account(s) on this IP. Multi accounts are frowned upon, tell us why you deserve one."); } // end multi IP trap .. test that's a step, -it should really be taken further if you are serious about this. Good Luck. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.