(X)Aseco+RASP Website Stats v2.3

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by Assembler Maniac » 15 Nov 2010 16:49

Papic: mssql is not the same as mysql

Find your php.ini file, look for php_mssql.dll, put a ";" in front of that line.

Find playerstats.php, replace it with the source from my most recent post (just a few before this one).

Try it all again and see how it works.

You may have to restart apache after changing php.ini.

If you still have problems, post your php.ini file.

papic
tricycle manager
tricycle manager
Posts: 27
Joined: 09 Feb 2009 11:54
Owned TM-games: tmuf
Location: St-Etienne (France)
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by papic » 15 Nov 2010 17:39

It works always not

my php.ini http://papicforever.free.fr/php_ini.zip

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by Assembler Maniac » 15 Nov 2010 17:53

papic wrote:It works always not

my php.ini http://papicforever.free.fr/php_ini.zip
Are you getting the same errors in your apache log?

What's the link for the pages that do not work?

papic
tricycle manager
tricycle manager
Posts: 27
Joined: 09 Feb 2009 11:54
Owned TM-games: tmuf
Location: St-Etienne (France)
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by papic » 15 Nov 2010 18:03

apache log

Code: Select all

[Mon Nov 15 18:58:12 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Mon Nov 15 18:58:12 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Mon Nov 15 18:58:12 2010] [notice] Server built: Dec 10 2008 00:10:06
[Mon Nov 15 18:58:12 2010] [notice] Parent: Created child process 5492
[Mon Nov 15 18:58:12 2010] [notice] Child 5492: Child process is running
[Mon Nov 15 18:58:12 2010] [notice] Child 5492: Acquired the start mutex.
[Mon Nov 15 18:58:12 2010] [notice] Child 5492: Starting 64 worker threads.
[Mon Nov 15 18:58:12 2010] [notice] Child 5492: Starting thread to listen on port 80.
[Mon Nov 15 18:58:12 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Mon Nov 15 18:58:12 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Mon Nov 15 18:58:12 2010] [notice] Server built: Dec 10 2008 00:10:06
[Mon Nov 15 18:58:12 2010] [notice] Parent: Created child process 5264
[Mon Nov 15 18:58:12 2010] [notice] Child 5264: Child process is running
[Mon Nov 15 18:58:12 2010] [notice] Child 5264: Acquired the start mutex.
[Mon Nov 15 18:58:12 2010] [notice] Child 5264: Starting 64 worker threads.
[Mon Nov 15 18:58:12 2010] [notice] Child 5264: Starting thread to listen on port 80.
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 46, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 46, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 47, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 47, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 48, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 48, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 49, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 49, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 50, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 50, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 51, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 51, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 59, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 59, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 60, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 61, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 62, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 60, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 61, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 62, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 46, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 47, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 48, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 49, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 50, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 51, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 59, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 60, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 61, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:14 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 62, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 46, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 47, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 48, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 49, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 50, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 51, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 59, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 60, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 61, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:16 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 62, referer: http://88.182.148.152/xaseco-stats/?serv=0&lang=FRA&page=serverstatsbox
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 46
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 47
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 48
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 49
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 50
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 51
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 59
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 60
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 61
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 62
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 46
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 47
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 48
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 49
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 50
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 51
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 59
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 60
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 61
[Mon Nov 15 18:58:17 2010] [error] [client 192.168.0.254] PHP Deprecated:  Function eregi_replace() is deprecated in C:\\wamp\\www\\xaseco-stats\\serverstats.php on line 62
[Mon Nov 15 18:58:25 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Mon Nov 15 18:58:25 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Mon Nov 15 18:58:25 2010] [notice] Server built: Dec 10 2008 00:10:06
[Mon Nov 15 18:58:25 2010] [notice] Parent: Created child process 2152
[Mon Nov 15 18:58:25 2010] [notice] Child 2152: Child process is running
[Mon Nov 15 18:58:25 2010] [notice] Child 2152: Acquired the start mutex.
[Mon Nov 15 18:58:25 2010] [notice] Child 2152: Starting 64 worker threads.
[Mon Nov 15 18:58:25 2010] [notice] Child 2152: Starting thread to listen on port 80.


thank you for your patience
Last edited by papic on 18 Nov 2010 14:34, edited 2 times in total.

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by Assembler Maniac » 15 Nov 2010 19:37

Not a clue. php.ini looks fine, code is obviously working, or it would throw some type of error.

Anyone have an idea? I can't think of any way for PHP to crash without some type of message about what happened.

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by Ant » 15 Nov 2010 19:47

That log shows loads of deprecated eregi_replace functions in serverstats.php - maybe try this one ? (swapped eregi_replace for preg_replace)

Code: Select all

<?php
/*************************************************
*                                                *
*   Stats for XAseco+RASP                        *
*   __________________________________________   *
*                                                *
*   Copyright (c) 2007-2008 by oS.Cypher         *
*   Developed as a Project of Old School Gaming  *
*                                                *
*   http://www.os-gaming.de                      *
*                                                *
*************************************************/

require("config.php");
require("includes/globals.php");
include("languages/".$lang.".php");
require("includes/ColorParser.php");

$cp = new ColorParser();
$arial = "fonts/tahoma";
$arial2 = "fonts/arial.ttf";

$timeout = 5;
$fp = @fsockopen($ip2[$serv], $server_port[$serv], $errno, $errstr, $timeout);
if($fp) {
	fclose($fp);
	require("includes/GbxRemote.inc.php");
	$client = new IXR_Client_Gbx;
	if (!$client->InitWithIp($ip[$serv], $port[$serv])) {
   		die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
	}
	if (!$client->query("Authenticate", $user[$serv], $pass[$serv])) {
		Error($client->getErrorMessage(), $client->getErrorCode());
		print "login failed !<br/>";
	}
	if($client->query('GetStatus')) {
		$Status = $client->getResponse();
	}
	if($client->query('GetPlayerList', 500, 0)) {
		$Players = $client->getResponse();
	}
	if($client->query('GetServerOptions')) {
		$ServerOptions = $client->getResponse();
		$servername=$ServerOptions['Name'];
		$servername1 = $servername;
		$servername = preg_replace("`\\$(w|s|n|i|z|g|m|r|>|<|o|l|h)`","",$servername);
		$servername = preg_replace("`\\[[A-Za-z0-9]+\.[A-Za-z0-9]+\.[A-Za-z0-9]+\]`","", $servername);
		$servername = preg_replace("`\\[[A-Za-z0-9]+\.[A-Za-z0-9]+\-[A-Za-z0-9]+\.[A-Za-z0-9]+\.[A-Za-z0-9]+\]`","", $servername);
		$servername = preg_replace("`\\$[a-f0-9]{3}`","", $servername);
		$servername = preg_replace("`\\$[a-f0-9]{2}`","", $servername);
		$servername = preg_replace("`\\$[a-f0-9]{1}`","", $servername);
	}

	if($client->query('GetCurrentChallengeInfo')) {
		$CurrentChallengeInfo = $client->getResponse();
	}
	$trackname = $CurrentChallengeInfo['Name'];
	$trackname1 = $trackname;
	$trackname = preg_replace("`\\$(w|s|n|i|z|g|>|<|o|l|h)`","",$trackname);
	$trackname = preg_replace("`\\$[a-f0-9]{3}`","", $trackname);
	$trackname = preg_replace("`\\$[a-f0-9]{2}`","", $trackname);
	$trackname = preg_replace("`\\$[a-f0-9]{1}`","", $trackname);

	$pl = count($Players);
	$connectedplayers = $pl." / ".$ServerOptions['CurrentMaxPlayers'];
	if($client->query('GetCurrentGameInfo')) {
		$GameInfo = $client->getResponse();
	}
	if($GameInfo['GameMode']==0) {
		$GameMode="Rounds";
	}elseif($GameInfo['GameMode']==1) {
		$GameMode="TimeAttack";
	}elseif($GameInfo['GameMode']==2) {
		$GameMode="Team";
	}elseif($GameInfo['GameMode']==3) {
		$GameMode="Laps";
	}elseif($GameInfo['GameMode']==4) {
		$GameMode="Stunts";
	}
}

if($statsbox=="1") {
	//create big Statusgraphic
	Header ("Content-type: image/png");
	$im = ImageCreateFromPNG ("img/statsbox/serverstats.png"); // Open of the Master-Picture
	$white = ImageColorAllocate ($im, 255, 255, 255);  // white
	$black = ImageColorAllocate ($im, 0, 0, 0); // black
	ImageTTFText ($im, 8, 0, 3, 39, $white, $arial2, $lng_stats_s_name);
	$cp->drawStyledString($im, 8, 5, 55, $white, $arial, $servername1);
	//ImageTTFText ($im, 8, 0, 5, 55, $black, $arial2, $servername);
	ImageTTFText ($im, 8, 0, 3, 69, $white, $arial2, "IP / Port");
	ImageTTFText ($im, 8, 0, 5, 85, $black, $arial2, $ip2[$serv].":".$server_port[$serv]);
	ImageTTFText ($im, 8, 0, 3, 99, $white, $arial2, $lng_stats_g_mode);
	ImageTTFText ($im, 8, 0, 5, 115, $black, $arial2, $GameMode);
	ImageTTFText ($im, 8, 0, 3, 129, $white, $arial2, $lng_stats_c_track);
	$cp->drawStyledString($im, 8, 5, 145, $white, $arial, $trackname1);
	//ImageTTFText ($im, 8, 0, 5, 145, $black, $arial2, $trackname);
	ImageTTFText ($im, 8, 0, 3, 159, $white, $arial2, $lng_stats_players);
	ImageTTFText ($im, 8, 0, 5, 175, $black, $arial2, $connectedplayers);
	ImageTTFText ($im, 8, 0, 60, 159, $white, $arial2, $lng_stats_s_status);
	ImageTTFText ($im, 8, 0, 62, 175, $black, $arial2, $Status['Name']);
	ImagePng ($im); // Als PNG ausgeben
	ImageDestroy ($im); // Resourcen freigeben
}

if($statsbox=="2") {
	//create small Statusgraphic
	Header ("Content-type: image/png");
	$im = ImageCreateFromPNG ("img/statsbox/serverstats_small.png"); // Open of the Master-Picture
	$white = ImageColorAllocate ($im, 255, 255, 255); // white
	$black = ImageColorAllocate ($im, 0, 0, 0); // black
	ImageTTFText ($im, 8, 0, 30, 16, $black, $arial2, $servername);
	ImageTTFText ($im, 8, 0, 30, 37, $black, $arial2, $trackname);
	ImageTTFText ($im, 8, 0, 30, 57, $black, $arial2, $connectedplayers." ".$lng_title_players);
	ImagePng ($im); // Als PNG ausgeben
	ImageDestroy ($im); // Resourcen freigeben
}

if($statsbox=="3") {
	//create World-TMN Statusgraphic
	Header ("Content-type: image/png");
	$im = ImageCreateFromPNG ("img/statsbox/signature_server.png"); // Open of the Master-Picture
	$white = ImageColorAllocate ($im, 255, 255, 255);
	$textX = 21;
	$textY = 12;
	$textsize = 9;
	$lineheight = 17;
	$cp->drawStyledString($im, $textsize, $textY, $textX, $white, $arial, $servername1);
	//imagettftext($im, $textsize, 0, $textY, $textX, $white, $arial2, $servername);
	imagettftext($im, $textsize, 0, $textY, $textX+=$lineheight, $white, $arial2, "IP/Port: " . $ip2[$serv].":".$server_port[$serv]);
	imagettftext($im, $textsize, 0, $textY, $textX+=$lineheight, $white, $arial2, "Game mode: " . $GameMode);
	imagettftext($im, $textsize, 0, $textY, $textX+=$lineheight, $white, $arial2, "Challenge: " . $trackname);
	imagettftext($im, $textsize, 0, $textY, $textX+=$lineheight, $white, $arial2, "Status: " . $Status['Name']);
	ImagePng ($im);
	ImageDestroy ($im);
}

?>

papic
tricycle manager
tricycle manager
Posts: 27
Joined: 09 Feb 2009 11:54
Owned TM-games: tmuf
Location: St-Etienne (France)
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by papic » 16 Nov 2010 11:16

my page post a strange caracter


Image
Last edited by papic on 18 Nov 2010 14:36, edited 1 time in total.

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by Ant » 17 Nov 2010 11:03

ok, this might sound like a big ask - but can you try setting up the stats again from a clean install (obviously make a backup of your current version) then change the playerstats.php to the one that AM posted and change the serverstats.php to the one I posted and see what happens then ?

papic
tricycle manager
tricycle manager
Posts: 27
Joined: 09 Feb 2009 11:54
Owned TM-games: tmuf
Location: St-Etienne (France)
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by papic » 17 Nov 2010 12:03

Don't work, I am going not to use banners.
Thank you for having tried ;)


http://papicforever.free.fr

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: (X)Aseco+RASP Website Stats v2.3

Post by w1lla » 17 Nov 2010 12:20

i'm trying to test the tmfdatafetcher 1.5 version with version 2.3 of the stats.

Will inform all when i get new info.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: (X)Aseco+RASP Website Stats v2.3

Post by w1lla » 17 Nov 2010 13:04

k found the problem ;)

Had problems with altering tables if tmfdatafetcher tables existed.

http://tmrankings.com/stats/tmfdatafetcher.v1.5.rar
or
http://tmrankings.com/stats/tmfdatafetcher.v1.5.zip

Should be working now ;)

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by Ant » 17 Nov 2010 14:10

nice one man, i'll test it in a bit and let you know how it goes :thumbsup:

Edit: By the way, you have the classes folder in there twice - by itself and in the tmfdatafetcher.v1.5 folder as well.

Edit2: It still didn't work man - the banners won't show with this version, but are fine with my other version (only with a couple of your changes)

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by Ant » 18 Nov 2010 10:54

Its ok now, I didn't test the version from the classes folder in the root of the download before. Updating just the tmfdatafetcher.inc.php from that classes folder now works :thumbsup:

User avatar
Nitrous
pedestrian
pedestrian
Posts: 10
Joined: 01 Sep 2010 12:13
Owned TM-games: TMU, TMUF,TM²-Stadiu
Location: Greece
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by Nitrous » 21 Nov 2010 03:18

I have a problem with encoding characters...
I've made a Greek translation and all i see is question marks instead of characters any idea on how to fix this?
Thank you.
Proud member of
Image
Life is a test where none can cheat.
Image
Image
Image

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by Ant » 21 Nov 2010 03:39

post a link to your changed files in a zip or something like that and i'll have a look.

Post Reply