Jump to content
Sign in to follow this  
ANTH

Server Stats

Recommended Posts

Hi

I would like some help on getting server scores transfer to update on to webpage, Kills, Deaths, thats sort of thing just wondering if any one knows how to do it. My goal is to track every single server for this. But need some help doing it.

Can anyone help?

Share this post


Link to post
Share on other sites

I tried to write a perl cgi to do that once, but didn't really finish it. I didn't link to it from the site as it is not yet finished, but you can see the how it looks like at our site. The core part looks like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#! /usr/bin/perl -w

use strict;

use IO::Socket;

use CGI::Carp qw(fatalsToBrowser);

#default values if no parameters are given

my $ARGS_HOSTNAME = 'gdt.game-server.cc';

#queryport defaults to serverport+1

my $ARGS_PORT = '2303';

#holds the response packet and is later used as loop variable for output

my $response="bla";

#will hold output data in key/value format

my %ausgabe;

#holder for stripping off leading slash in response ticket and used as loop

my $holder=0;

#open socket

my $sock = new IO::Socket::INET (

PeerAddr => $ARGS_HOSTNAME,

PeerPort => $ARGS_PORT,

Proto => 'udp',

Blocking => 1,

);

die "Could not create socket: $!\n" unless $sock;

$sock->autoflush(1);

$sock->syswrite("\\status\\");

#data length of 8192 bytes should be enough for about 150 players

if ($sock->sysread($response,8192))

{

#split off first slash in answer packet

($holder,%ausgabe)= split /\\/,$response;

} else {

print "Server $ARGS_HOSTNAME:$ARGS_PORT is down";

}

Share this post


Link to post
Share on other sites

looks complicated im not fimliar with pearl :S. But im a very good learner when it comes to computers. I will give it ago.

Share this post


Link to post
Share on other sites

Moving to MP.

And ANTH your sig image exceeds the rules, expect a PM smile_o.gif

Share this post


Link to post
Share on other sites

pfff some people have nothing better to do. tounge_o.gif

Share this post


Link to post
Share on other sites

where can i reach him m8 i tried his hotmail but it failed to send?

Share this post


Link to post
Share on other sites

last time i talked to him was april, the 1/8th squad may know how to reach him, and im told just now on MSN that ETA Squad has most of the coding as well, I'm at work so i dont have any of the squad links handy, but they are listed in these forums under squad forums

http://www.flashpoint1985.com/cgi-bin....SF;f=13

I had Mirek (not marik) set this up a few years back

Share this post


Link to post
Share on other sites

here is ETA's OFP Server stat program - http://www.etaserver.com/ServerStat/ServerStat.html

requires Windows dedicated server to be run on

I also have php script for collecting stats from a server - it requires php hosting and CRON JOBS..you can modify those scripts to make em better if you want - of course it requires knowledge of php...

you can see demo here http://flashpoint2.ru/web/modules.php?name=Stats

also, this script is only for fun - no way you gonna judge ppl on how good they play based on these stats because

1) script doesn't collect info from all maps, map has to have an end of time (for playing one specific map) variable so script knows when a new map is being played and when to record

2) it doesn't count capped flags and etc because OFP server does not give out such info, only kills, deaths, players, map name, date and stuff.

if you need this script I can get it for you in a couple of days.

Share this post


Link to post
Share on other sites

Yes this is the one i need to track the servers doing it as a project and hopefully i can do it in ofp 2. If anyone would like to help me with this get in contact with me cause im not to hot on my php.

Share this post


Link to post
Share on other sites
What is cron jobs?

Cron jobs are a method of running programs/script on a regular basis. I guess you would use the task scheduler for this i guess.

It means you do not only need a webserver, but a server where you can run programs and access the system, not only the webserver content, ie a dedicated server of some kind.

Share this post


Link to post
Share on other sites

Ahh just checked with my weppage provider i have this on my webpage. biggrin_o.gif

Share this post


Link to post
Share on other sites

WKK also made a php web stats page program.  Download it here and read the readme.txt.  Pretty easy to use.  =USA= has an example of it =USA= home

Share this post


Link to post
Share on other sites

wkk made a query script, however, it does not record your stats

Share this post


Link to post
Share on other sites

no I think it's possible to track CTI maps..it's that u will have to come up with something to modify CTI to have some kind of time limit set up...or maybe that stat script would still be able to track CTI..just try it like it is and see if it works..

Share this post


Link to post
Share on other sites
Hey guys my website is starting to come together im only tracking one atm but here it is My stats and news page

-------

Is this better placebo pff my sig is 120, MAX is 100 pff pathetic. I dont have time to read all fourm rules btw but them 20 pixels must make some kind a difference.

where are the stats?

dont feel bad i never read the rules once in almost 3 years

Share this post


Link to post
Share on other sites

Stats are at the bottom on the left m8, 4 servers been tracked but i need some help.

I want a top 20 players from them 4 servers but havent got a clue how to do it and i would like the players to be purged weekly, like a weekly form check to see who is playing good that week.

I also want a clan score total so if any one can help with these two questions please do.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×