How to track players


(Indloon) #1

Hello.

Now I have finnaly understanded how the server query works and made the script.And also founded way to store visitors into graphs.

But now I got question.
How to track players via PHP?
Let we take an example: http://www.yawn.be/findPlayer.yawn
I got question,hows GUID or ETpro GUID tracked?Or is just like that,every server,there player will collected to database,where it gets unique ID,thats how its in TB,SL system.But hows about the GUID?

Thank you.


(hellreturn) #2

GUID is got from server or PB logs. TB and SL doesn’t tracker GUID and neither IP.

If you would like to track IP and GUID without doing any code, I would suggest to stream with PBBans. Once you start streaming it will start tracking for free.

Now if you are asking how to code it then VSP stats track GUID and stats. May be look at there code on how they parse logs?


(Indloon) #3

[QUOTE=hellreturn;370344]GUID is got from server or PB logs. TB and SL doesn’t tracker GUID and neither IP.

If you would like to track IP and GUID without doing any code, I would suggest to stream with PBBans. Once you start streaming it will start tracking for free.

Now if you are asking how to code it then VSP stats track GUID and stats. May be look at there code on how they parse logs?[/QUOTE]

Thanks for the reply.

Well Im trying to make a system,what sends “bots” called TRACKER to all ET servers,they will save the stats.txt and send to system,where the player gets kills and deaths.That was my idea,but the making of it is…
Well,my friend Teetkalm will help me out here.His good coder with 8 years PHP excperince!


(stealth6) #4

[QUOTE=Genert;370412]Thanks for the reply.

Well Im trying to make a system,what sends “bots” called TRACKER to all ET servers,they will save the stats.txt and send to system,where the player gets kills and deaths.That was my idea,but the making of it is…
Well,my friend Teetkalm will help me out here.His good coder with 8 years PHP excperince![/QUOTE]

Not sure if it’s possible to connect to a server with php in the way you want, you’d need some other kind of client to connect to the server and then transfer it to the site to be parsed with php

If you find a way to get the GUIDs without a client that would be interesting, I’m actually wondering how yawn got so many guids :eek:


(schnoog) #5

Its possible as far as you have the rcon password. Then it`s no problem to request /pb_sv_plist


(Indloon) #6

Yeah,a bot what knows rcon:u

Well I look what to do.If I get somehow GUIDs I report for that.Just looking the safest way how to do that.


(Indloon) #7

I find another site.
Its alternate to yawn tracker.
http://yae.trakos.pl/index.php?action=news


(schnoog) #8

I may be wrong, but i believe also yae uses rcon (just like Yawn, but yawn also uses pbucon [which is obsoleth or yae because they also tracking slac server).


(Indloon) #9

Seems so.
Btw its TZAC now,not SLAC anymore. http://www.crossfire.nu/?x=news&mode=item&id=6883


(schnoog) #10

thanks for this information, Genert.
Just edited the SL tracker to meet this new cirumstance.


(Indloon) #11

Yeah,theres also new images out:)
http://tz-ac.com/favicon.ico
Btw I noticed Toplist generator,but the SL news are pretty old already,starting to worry that news written is dead:p


(Indloon) #12

Btw,you could remove the +private slots of serverviewer&serverlist and use:


<?php 
$max = getValue("sv_maxclients");
$priv = getValue("sv_privateClients:");
?>
<td class='cell'><?php echo count($players); ?> / <?php $max+$priv;?></td>


(schnoog) #13

Most news comes from rtcwmap.de via rss.
To spread news about our new features makes me feeling narcism :wink:

p.s.: Thanks for the image :wink:
p.p.s.: I`ll discuss the slot-display with the SL team


(Indloon) #14

So lemme guess.
SL runs ar Qtracker at backround what saves the serverlist to SQL table.


CREATE TABLE `servers` (
  `ip` varchar(255) NOT NULL,
  `port` varchar(5) NOT NULL,
  `name` varchar(255) NOT NULL,
  `mapname` varchar(255) NOT NULL,
  `ID` int(255) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8

??


(schnoog) #15

Almost right Genert :wink:



CREATE TABLE IF NOT EXISTS `clq_server_info` (
  `IDX` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `NAME` varchar(100) DEFAULT NULL,
  `RAWNAME` varchar(64) DEFAULT NULL,
  `IP` varchar(32) DEFAULT NULL,
  `SCANNER` enum('','quake3') DEFAULT 'quake3',
  `PRIORITY` char(1) DEFAULT 'N',
  `PRIO_MODIFIER` float NOT NULL DEFAULT '1',
  `LASTSCAN` int(10) NOT NULL DEFAULT '0',
  `LASTRESPONSE` int(10) NOT NULL DEFAULT '0',
  `NEXTSCAN` int(10) NOT NULL DEFAULT '0',
  `STATUS` char(1) DEFAULT 'U',
  `SEQCOUNT` int(11) NOT NULL DEFAULT '0',
  `FULLTIME` int(10) unsigned NOT NULL DEFAULT '0',
  `FULLSCORE` int(10) unsigned NOT NULL DEFAULT '0',
  `FULLPLAYERS` int(10) unsigned NOT NULL DEFAULT '0',
  `TEMPTIME` int(10) unsigned NOT NULL DEFAULT '0',
  `TEMPPLAYERS` int(11) NOT NULL DEFAULT '0',
  `GAMEIDX` mediumint(8) unsigned NOT NULL DEFAULT '1',
  `GAMEID` varchar(8) DEFAULT 'unknown',
  `PROTOCOL` mediumint(9) NOT NULL DEFAULT '-1',
  `MODNAME` varchar(16) DEFAULT 'unknown',
  `MODVERSION` varchar(32) DEFAULT NULL,
  `GAMETYPE` enum('','obj','sw','cpgn','lms','ctf','mv') DEFAULT NULL,
  `GAMESTATUS` enum('','warmup','process','review') DEFAULT NULL,
  `MAPNAME` varchar(32) DEFAULT '-',
  `MAPIDX` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `MAPLASTCHANGE` int(10) unsigned NOT NULL DEFAULT '0',
  `MAPTIMELEFT` smallint(5) unsigned NOT NULL DEFAULT '0',
  `NEXTMAP` varchar(32) DEFAULT NULL,
  `MAXSLOTS` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `CURRSLOTS` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `INVSLOTS` smallint(5) unsigned NOT NULL DEFAULT '0',
  `PRIVSLOTS` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `FLAGS` set('....ourflags...') DEFAULT NULL,
  `OS` enum('','windows','linux','mac') DEFAULT NULL,
  `PROTECTION` set('','pb','etpro','cd','slac') DEFAULT NULL,
  `TYPE` enum('','tv') DEFAULT NULL,
  `RATINGSTATUS` enum('auto','on','off') DEFAULT 'auto',
  `RATINGMSG` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `ENABLED` enum('yes','') DEFAULT 'yes',
  `COUNTRY` char(2) DEFAULT NULL,
  `REGION` char(1) DEFAULT NULL,
  `INFOSTRING` varchar(80) DEFAULT NULL,
  `URL` varchar(128) DEFAULT NULL,
  `MESSAGES` varchar(100) DEFAULT NULL,
  `CMDLINE` varchar(255) DEFAULT NULL,
  `SLOWN` enum('','yes') DEFAULT NULL,
  `SLBONUS` float unsigned NOT NULL DEFAULT '1',
  `PROCTIME` float(8,5) NOT NULL DEFAULT '-1.00000',
  `FULLPROCTIME` float(8,5) NOT NULL DEFAULT '0.00000',
  `TIMEUP` int(10) unsigned NOT NULL DEFAULT '0',
  `TIMEDOWN` int(10) unsigned NOT NULL DEFAULT '0',
  `CLANIDX` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `SKILL_EFF` bigint(20) unsigned NOT NULL DEFAULT '0',
  `SKILL_TIME` int(10) unsigned NOT NULL DEFAULT '0',
  `POPULARITY` float NOT NULL DEFAULT '0',
  `RANK` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `AVGRATING` float NOT NULL DEFAULT '0',
  `RATINGTIME` float NOT NULL DEFAULT '3600',
  `FAULTS` int(10) unsigned NOT NULL DEFAULT '0',
  `GAMES` mediumint(8) unsigned NOT NULL DEFAULT '1',
  `ISDEBUG` enum('','yes') DEFAULT NULL,
  PRIMARY KEY (`IDX`),
  UNIQUE KEY `UIP` (`IP`),
  KEY `INEXTSCAN` (`NEXTSCAN`),
  KEY `IRAWNAME` (`RAWNAME`(5)),
  KEY `POPULARITY` (`POPULARITY`),
  KEY `SLOWN` (`SLOWN`),
  KEY `CLANIDX` (`CLANIDX`),
  KEY `RANK` (`RANK`),
  KEY `flagsindex` (`FLAGS`),
  KEY `enabledindex` (`ENABLED`),
  KEY `GameIDIndex` (`GAMEIDX`),
  KEY `mapnameindex` (`MAPNAME`)
)

where IP is the combination of IP and port.

TBH: Im very impressed on the code behind SL. An own coded tracker capsuled in a nice class is only the very beginning. An awesome implementation of a modified version of FIDE rating algo (the idea source is used to rate chess player) is the most crazy codework Ive ever seen.


(Indloon) #16

Holy ****.
Well thats an big database I guess XD
Well I tought that SL had like live stats.But seems that saving data to SQL is more stable:ö
But Proddi did good job,eh?:D:D:D
Well its not easy system:D
Its an server,where are players.The players will be saved to database,every player gets her/his id in url.Then if the colors are same and system dectects him/her playing on server,then every XP what comes,like 300 XP per session and if its higher than avarange PPM,then you ill get raiting per XP.Seems easy for PHP code XD


(schnoog) #17

The ratings depends not only on the XP earned within a session. It also depends on the rank of the enemy ( http://en.wikipedia.org/wiki/Arpad_Elo has developed such kind of rating, more about the rating theory: http://en.wikipedia.org/wiki/Elo_rating_system )

The server-stats were generated half-dynamically. Each server gets scanned every 90s. For calculating the day-wise rating a new scan is done and combined with the “historical” data.


(Indloon) #18

Yea.
http://genert.impact.pri.ee/test/server.php?ip=188.165.233.195:29000 this is what I have atm,Im stuck at team point X(
I know theres the P,what shows the place on team of player.


switch $players[$team]) 
        { 
            case 0: 
                'Con'; 
                break; 
            case 1: 
                'Axis'; 
            break; 
            case 2: 
                 'Allies'; 
            break; 
            default: 
                'Spec'; 
            } 

This is how my core looks like: http://paste.entirely.pro/phpsyntax.php?file=52hfp
The problem is about adding the team request to each player:(
But yeah,tried to contact with Proddi about that,thats why I asked for his ICQ,but no,his offline all the time:p


(schnoog) #19

Genert, please send me your e-mail adress and I`ll open the codebase to you.


(Indloon) #20

Thank you<3
Btw,you should chamod .htaccess files at splatterladder.
I can see them:p