[bf1942] BF:V UDP Status Query Help

-=Psykoral=- psykoral at comcast.net
Sun Apr 11 18:01:33 EDT 2004


Oh, on a side note there is an easy way to make the stats page a 
PHP-Nuke module if you'd rather have that then have it
be a whole separate page :c)

-=Psykoral=-


-----Original Message-----
From: Sam Evans [mailto:sam at neuroflux.com] 
Sent: Sunday, April 11, 2004 2:04 PM
To: bf1942 at icculus.org
Subject: RE: [bf1942] BF:V UDP Status Query Help


You are more than welcome to look at my source code for how I am doing
it in PHP.  http://www.statsshack.com

-Sam


-----Original Message-----
From: -=Psykoral=- [mailto:psykoral at comcast.net] 
Sent: Sunday, April 11, 2004 1:53 PM
To: bf1942 at icculus.org
Subject: RE: [bf1942] BF:V UDP Status Query Help

Well, I'm not sure how you intend on printing the data, 
but in PHP you can use the split() function built into
PHP to "split" data. Depending on how you're gathering
that info, this may or may not help, but I'll toss it out anyways... And
forgive me if it seems like I'm giving a lesson or writting a tutorial,
it's in my nature to be very explainitory. :cP

For example...
list ($data1, $data2) = split ('[^Z]', $data);

...You'll probably have to set a few of these up to
get it to do what you want it to, but basically what it does, 
is split the data into different chucnks, which has a variable name for
each. So in the above example...

$data would be the name you would give to the huge chunk of info you're
getting. Using ^Z as the split point, you would then get everything up
to but not including ^Z created as $data1 and 
everything after (but again not including) ^Z would be $data2. So, then
you can take $data2 and split THAT up with the split point being ^B this
time, and you should get just what you want.

-=Psykoral=-


-----Original Message-----
From: john [mailto:john at pmmci.com] 
Sent: Sunday, April 11, 2004 12:14 PM
To: bf1942 at icculus.org
Subject: [bf1942] BF:V UDP Status Query Help


Hello all.

I'm trying to create some PHP code to get server status from a BF:V
Server.


I've got the query and the result, but I am having problems parsing the
result.

hostname^@NinjaServe.com -
#bfvietnam^@hostport^@15567^@mapname^@OPERATION
GAME WARDEN^@gametype^@conquest^@numplayers^@26^@max
players^@26^@gamemode^@closedplaying^@password^@0^@gamever^@v1.0^@dedica
ted^
@2^@status^@3^@game_id^@bfvietnam^@map_id^@BFVietna
m^@sv_punkbuster^@1^@unknown^@^@timelimit^@unlimited^@number_of_rounds^@
1^@s
pawn_wave_time^@15s^@spawn_delay^@5s^@soldier_frien
dly_fire^@100%^@vehicle_friendly_fire^@100%^@game_start_delay^@20s^@tick
et_r
atio^@199%^@allow_nose_cam^@yes^@external_view^@on
^@us_team_ratio^@1^@nva_team_ratio^@1^@bandwidth_choke_limit^@0^@free_ca
mera
^@on^@auto_balance_teams^@off^@name_tag_distance^@1
0^@name_tag_distance_scope^@60^@kickback^@0%^@kickback_on_splash^@0%^@so
ldie
r_friendly_fire_on_splash^@100%^@vehicle_friendly_f
ire_on_splash^@100%^@cpu^@2660^@cpu_given_to_ai^@^@bot_skill^@^@^@^@^Zpl
ayer
_^@score_^@deaths_^@ping_^@team_^@kills_^@^@-=|DMA|
=- RAge^@8^@11^@115^@2^@5^@-=|DMA|=-
moose^@8^@7^@18^@2^@7^@Tiny|Enforcer^@12^@7^@96^@2^@6^@ALT+F4^@5^@8^@90^
@1^@
5^@|D1E|Gnosti
C^@-1^@3^@31^@1^@1^@cantshoot4Jack^@-2^@2^@94^@1^@0^@1ManRme^@0^@0^@57^@
1^@0
^@Spenserheel^@1^@3^@88^@2^@0^@=HR=ICEPICK^@4^@0^@6
0^@1^@2^@=HR=Meltdown^@14^@6^@78^@1^@2^@Probee bro^@8^@5^@49^@2^@2^@Buck
Wild^@16^@3^@83^@2^@14^@Fat Albert^@4^@0^@35^@1^@1^@th
eSPY^@3^@4^@41^@2^@0^@|D1E|TrIcKy^@5^@3^@96^@2^@7^@PSYCHOSIS^@0^@0^@55^@
2^@0
^@xact^@0^@0^@22^@2^@0^@-[Pann]-RUSH2112^@0^@4^@60
^@2^@1^@[BS]Cpt.
America^@4^@10^@62^@1^@6^@Wormtongue^@12^@11^@38^@1^@12^@|D1E|Mr
God^@1^@7^@35^@1^@5^@|D1E|UmySlut^@5^@4^@48^@
1^@5^@=HR=Zeus^@15^@4^@119^@2^@5^@Packetloss^@0^@0^@51^@1^@0^@Frost(AA)^
@3^@
3^@152^@1^@3^@=420th=<95>Dewd^@0^@2^@31^@2^@0^@^@^B
team_t^@^@axis^@allied^@

Is what I am getting right now for the reply; All that I want from here
is the player data; I can see that the player data is listed between
"^Z" and the "^B" 

I can't seem to figure out what "^Z" and "^B" are to select the data
from regex. Any help would be appreciated.








More information about the Bf1942 mailing list