Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Possible multiaccount detection

Status
Not open for further replies.
Junior Spellweaver
Joined
Sep 9, 2010
Messages
107
Reaction score
15
I'm admin acces 9 , i logged in my admin account i browsed multi.php and i got this error :
Code:
Warning: Invalid argument supplied for foreach() in /home/travma/domains/travmania.allcx.com/public_html/multi.php on line 35
what's the deal ?
 
Junior Spellweaver
Joined
Sep 9, 2010
Messages
107
Reaction score
15
Code:
//////////////////////////////////
//    **** LOG SETTINGS  ****   //
//////////////////////////////////
// LOG BUILDING/UPGRADING
define("LOG_BUILD",true);
// LOG RESEARCHES
define("LOG_TECH",true);
// LOG USER LOGIN (IP's)
define("LOG_LOGIN",true);
// LOG GOLD
define("LOG_GOLD_FIN",true);
// LOG ADMIN
define("LOG_ADMIN",true);
// LOG ATTACK REPORTS
define("LOG_WAR",true);
// LOG MARKET REPORTS
define("LOG_MARKET",true);
// LOG ILLEGAL ACTIONS
define("LOG_ILLEGAL",true);
it was true , so any suggestion ?
 
Newbie Spellweaver
Joined
Jul 2, 2011
Messages
50
Reaction score
4
When I installed this mod, first I got error:

Warning: Invalid argument supplied for foreach() in ****** on line 27
Warning: Invalid argument supplied for foreach() in ****** on line 35

Then I did what you posted and now i get error:

Warning: Invalid argument supplied for foreach() in ****** on line 27
No multiaccounts found
 
Junior Spellweaver
Joined
Aug 11, 2010
Messages
186
Reaction score
195
PHP:
<?php
/**
 * @package TravianX
 * @author Genesis 
 * @copyright You may not copy this code to any other sites than RageZone.com
 * @name Multiaccount searcher
 */

include ("GameEngine/Account.php");
define('PREFIX', TB_PREFIX);
if ($session->access != ADMIN) die("This is only for admins mate :)");

$logins = mysql_query("SELECT * FROM ".PREFIX."login_log");
while($login = mysql_fetch_assoc($logins)) {
	if (count($login_list)) {
		if (!isset($login_list[$login['ip']][$login['uid']])) {
			$login_list[$login['ip']][$login['uid']] = $login;
		}
	}
	else {
		$login_list[$login['ip']][$login['uid']] = $login;
	}
}

if (cont($login_list)) {
	foreach ($login_list as $ip => $data) {
		if (count($login_list[$ip]) > 1) {
			$multi_accounts[$ip] = $data; }
	}
}

echo '<table>'; 
if (count($multi_accounts)) {
	foreach ($multi_accounts as $uid => $data) {
		$output = ""; foreach ($data as $dataB) {
			$data_new[] = $dataB; }

		foreach ($data_new as $index => $multiaccount_data) {
			$userdata[] = mysql_fetch_assoc(mysql_query("SELECT * FROM ".PREFIX."users WHERE id = ".$multiaccount_data['uid'])); }

		echo '<tr>
		<td>
			'; foreach ($userdata as $u) {
			$output[] = '<a href="spieler.php?uid='.$u['id'].'">'.$u['username'].'</a>'; }

		echo $output = implode(' and ', $output); echo '
		</td>
		<td>
			with IP '.$data_new[0]['ip'].'
		</td>
	</tr>'; }
}
else {
	die("No multiaccounts found"); 
}
echo '</table>';
updated one without errors
 
Last edited:
Newbie Spellweaver
Joined
Jul 2, 2011
Messages
50
Reaction score
4
After this fix, I get error:
Parse error: syntax error, unexpected '{' ******* on line 25
 
Junior Spellweaver
Joined
Aug 11, 2010
Messages
186
Reaction score
195
So for the last time:
(execuse me for previous fails)

PHP:
<?php
/**
 * @package TravianX
 * @author Genesis 
 * @copyright You may not copy this code to any other sites than RageZone.com
 * @name Multiaccount searcher
 */

include ("GameEngine/Account.php");
define('PREFIX', TB_PREFIX);
if ($session->access != ADMIN) die("This is only for admins mate :)");

$logins = mysql_query("SELECT * FROM ".PREFIX."login_log");
while($login = mysql_fetch_assoc($logins)) {
	if (count($login_list)) {
		if (!isset($login_list[$login['ip']][$login['uid']])) {
			$login_list[$login['ip']][$login['uid']] = $login;
		}
	}
	else {
		$login_list[$login['ip']][$login['uid']] = $login;
	}
}

if (count($login_list)) {
	foreach ($login_list as $ip => $data) {
		if (count($login_list[$ip]) > 1) {
			$multi_accounts[$ip] = $data; }
	}
}

echo '<table>'; 
if (count($multi_accounts)) {
	foreach ($multi_accounts as $uid => $data) {
		$output = ""; foreach ($data as $dataB) {
			$data_new[] = $dataB; }

		foreach ($data_new as $index => $multiaccount_data) {
			$userdata[] = mysql_fetch_assoc(mysql_query("SELECT * FROM ".PREFIX."users WHERE id = ".$multiaccount_data['uid'])); }

		echo '<tr>
		<td>
			'; foreach ($userdata as $u) {
			$output[] = '<a href="spieler.php?uid='.$u['id'].'">'.$u['username'].'</a>'; }

		echo $output = implode(' and ', $output); echo '
		</td>
		<td>
			with IP '.$data_new[0]['ip'].'
		</td>
	</tr>'; }
}
else {
	die("No multiaccounts found"); 
}
echo '</table>';
updated one without errors
 
Last edited:
Newbie Spellweaver
Joined
Jul 2, 2011
Messages
50
Reaction score
4
I guess I'm getting pretty anoying, but now i get this error:
Fatal error: Call to undefined function cont() ***** on line 25
 
Status
Not open for further replies.
Back
Top