Jump to content
MakeWebGames

Multi Account Issues


sevendet

Recommended Posts

Re: Multi Account Issues

do i replace this

$ip = ($_SERVER['HTTP_X_FORWARDED_FOR'])

? $_SERVER['HTTP_X_FORWARDED_FOR']

: $_SERVER['REMOTE_ADDR'];

if(file_exists('ipbans/'.$ip))

{

die("<font color=red size=+1>Your IP has been banned, there is no way around this.</font></body></html>");

}

with what you posted then? thats in register.php

Link to comment
Share on other sites

Re: Multi Account Issues

so i tried to replace that and this is what i got

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/game/public_html/register.php on line 27

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/game/public_html/register.php on line 28

Link to comment
Share on other sites

Re: Multi Account Issues

Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO) in /home/game/public_html/register.php on line 27

Warning: mysql_query(): A link to the server could not be established in /home/game/public_html/register.php on line 27

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/game/public_html/register.php on line 28

Link to comment
Share on other sites

Re: Multi Account Issues

now it lets you register but doesnt stop the multi account this is what the section looks like

 

require "mysql.php";

$sd = ($_SERVER['HTTP_X_FORWARDED_FOR'])

? $_SERVER['HTTP_X_FORWARDED_FOR']

: $_SERVER['REMOTE_ADDR'];

$q=mysql_query("SELECT COUNT(*) FROM users WHERE lastip='$ip'");

$count = mysql_fetch_array($q);

if($count[0] > 1)

{

die("<center>logo.png</center><center><h1>One account per ip</h1></center>

 

<center>If you wish to create an account for a family member then plase contact me <a href='mailto:[email protected]?subject=Multiple%20Account'>

<font color='red'>HERE</font></a></center>");

}

if(file_exists('ipbans/'.$sd))

{

die("<font color=red size=+1>Your IP has been banned, there is no way around this.</font></body></html>");

}

global $c;

Link to comment
Share on other sites

Re: Multi Account Issues

o.k.  I have tested this, and it seems to work just fine.    It won't even let them type in thier info, if thier IP is the same as one that is already registered.

 

require "mysql.php";
global $c;

$q=mysql_query("SELECT * FROM users WHERE lastip='{$ip}'",$c);
if(mysql_num_rows($q))
{
die ("IP already in use. If you would like to register a Family member plz email the owners at owner@#######");
}

 

R.F.

Link to comment
Share on other sites

Re: Multi Account Issues

 

its not letting anyone sign up still ive been testing different things

and i cant seem to get this either

Did you take out all you had before and put what I suggested in it's place

Also if you are trying to test with you own computer you will not be able to register with it. You will need to use another computer that has a different IP

Link to comment
Share on other sites

Re: Multi Account Issues

yea we gotta keep trying to find this thing and make it work right someone said this would work too but i was getting errors

 

}

$username=$_POST['username'];

$username=str_replace(array("<", ">"), array("<", ">"), $username;

$q=mysql_query("SELECT * FROM users WHERE username='{$username}'",$c);

$ipcheak=mysql_query(SELECT * FROM `users` WHERE lastip='$ip'",$c);

if(mysql_num_rows($ipcheak))

{

die("Someones Already Using This IP");

}

Link to comment
Share on other sites

Re: Multi Account Issues

 

$ip = ($_SERVER['HTTP_X_FORWARDED_FOR'])
    ?  $_SERVER['HTTP_X_FORWARDED_FOR']
    :  $_SERVER['REMOTE_ADDR'];
$q=mysql_query("SELECT COUNT(*) FROM users WHERE lastip='$ip'");
$count = mysql_fetch_array($q);
if($count[0] > 0)
{
die("One acc per ip");
}

 

 

This worked for me. with no problems

Link to comment
Share on other sites

Re: Multi Account Issues

Not sure what's going on with yours sevendet, but I had no problems with the script I posted, but then again there may be a few diffs, between our setups. On another note, I tried the link above for you game, when I click register I get a 404 page not found error.

Link to comment
Share on other sites

  • 6 months later...

Re: Multi Account Issues

Simple :-D

open register.php and replace with this

<?php
session_start();
print "<html>
<head>
<title>Crime-city</title>
<style>
body { font-family:Verdana;font-size:9pt;color: white;
  background-color:#000000;
  scrollbar-base-color: #005B70;
  scrollbar-arrow-color: #F3960B;
  scrollbar-DarkShadow-Color: #000000; }
a:visited,a:active,a:hover,a:link { color: blue;text-decoration: none; }
table,tr,td { font-size:9pt; }
img { border:none; }

</style>
</head>
<body><table width='100%' border='1' bgcolor='#000000'>
 <tr>
   <th scope='col'>[img=logo.png]</th>
 </tr>
</table>




<center>    ";
$ip = ($_SERVER['HTTP_X_FORWARDED_FOR'])
   ?  $_SERVER['HTTP_X_FORWARDED_FOR']
   :  $_SERVER['REMOTE_ADDR'];
if(file_exists('ipbans/'.$ip))
{
die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>");
}
require "mysql.php";
global $c;
if($_POST['username'])
{
$sm=100;
if($_POST['promo'] == "908")
{
$sm+=100;
}
$username=$_POST['username'];
$username=str_replace(array("<", ">"), array("<", ">"), $username);
$q=mysql_query("SELECT * FROM users WHERE username='{$username}'",$c);
if(mysql_num_rows($q))
{
print "Username already in use. Choose another.";
}
else if($_POST['password'] != $_POST['cpassword'])
{
print "The passwords did not match, go back and try again.";
}
else
{
$_POST['ref'] = abs((int) $_POST['ref']);
$ip = ($_SERVER['HTTP_X_FORWARDED_FOR'])
   ?  $_SERVER['HTTP_X_FORWARDED_FOR']
   :  $_SERVER['REMOTE_ADDR'];
$q=mysql_query("SELECT * FROM users WHERE lastip='$ip' AND userid={$_POST['ref']}",$c);
$a=mysql_query("SELECT * FROM users WHERE lastip='$ip'",$c);
if(mysql_num_rows($a) > 0)
{
die("No multi's! Your not trying to make another account are you! Sorry! Not Allowed!");
}
if(mysql_num_rows($q))
{
die("Creating Referral Multies Is Not Aloud.");
}
if($_POST['ref']) {
$q=mysql_query("SELECT * FROM users WHERE userid={$_POST['ref']}",$c);
$r=mysql_fetch_array($q);
}
mysql_query("INSERT INTO users (username, login_name, userpass, level, money, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email,  lastip) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm,  1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}',  '$ip')", $c);
$i=mysql_insert_id($c);
mysql_query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)", $c);

if($_POST['ref']) {
require "global_func.php";
mysql_query("UPDATE users SET crystals=crystals+2 WHERE userid={$_POST['ref']}",$c);
event_add($_POST['ref'],"For refering $username to the game, you have earnt 2 valuable crystals!",$c);
mysql_query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$ip')", $c);
}
print "Thank You For Registering! Please Login.

> [url='login.php']Login[/url]";
}
}
else
{
print "<style type='text/css'>
<!--
#Layer2 {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 354px;
top: 356px;
}
#Layer6 {
position:absolute;
width:182px;
height:202px;
z-index:2;
left: 10px;
top: 204px;
}
#Layer7 {
position:absolute;
width:200px;
height:115px;
z-index:3;
left: 350px;
top: 201px;
}
#Layer8 {
position:absolute;
width:1081px;
height:33px;
z-index:4;
left: 71px;
top: 590px;
}
-->
</style>
<body bgcolor='#000000'>
<div id='Layer7'>

 <table width='530' height='109' border='1' bgcolor='#000000'>
   <tr>
     <th scope='col'> Crime-city Registration</th>
   </tr>
<td>
  <center>

        <form action=register.php method=post>

<table width='530' border='1'>


<td><div align='center'>Username:</div></td>
   <td><div align='center'>     
<input type='text' name='username' />
   </div></td>
 </tr>
 <tr>
   <td><div align='center'>Password:</div></td>
   <td><div align='center'>
     <input type='password' name='password' />
   </div></td>
 </tr>
 <tr>
   <td><div align='center'>Confirm Password: </div></td>
   <td><div align='center'>
     <input type='password' name='cpassword' />
 Gender: <select type='dropdown' name='gender'><option value='male'>Male</option><option value='female'>Female</option></select>


   </div></td>
 </tr>
 <tr>
   <td><div align='center'>Email Address: </div></td>
   <td><div align='center'>
     <input type='text' name='email' />
   </div></td>
 </tr>
 <tr>
   <td><div align='center'>Promo Code: </div></td>
   <td><div align='center'>
     <input type=text name=promo />
   </div></td>
 </tr>
 <tr> </tr>
</table>

<input type=hidden name=ref value='";
if($_GET['REF']) { print $_GET['REF']; }
print "'>
<input type=submit value=Submit></form><form name=tos>
<input type='checkbox' name=mybox value='1'>I Agree To The Terms Of Service
</form>
     </center></td>
   </tr>
 </table>
</div>
<div id='Layer6'>
 <table width='181' height='203' border='1' bgcolor='#000000'>
   <tr>
     <th height='39' scope='col'>Navigation</th>
   </tr>
   <tr>
     <td height='30'>[url='login.php']Login[/url]</td>
   </tr>
   <tr>
     <td height='28'>[url='register.php']Register[/url]</td>
   </tr>
   <tr>
     <td height='30'>[url='#']Lost Password?[/url]</td>
   </tr>
   <tr>
     <td height='30'>[url='#']Screenshots[/url]</td>
   </tr>
   <tr>
     <td height='30'>[url='tos.php']Terms Of Service[/url]</td>
   </tr>
 </table>
</div>
<div id='Layer8'>
table width='98%' border='1' bgcolor='#000000'>
   <tr>
     <th scope='col'><center>
       | This Game Is Brought To You By solar! |
     </center>";
}
print "</body></html>";
?>

 

 

 

Make sure you change "Crime-city" to your game name :-P

That register page has a great look and u can select gender woooo plus no multis

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...