[bf1942] bf2 rcon php script

Andrew Armstrong andrewa at bigpond.net.au
Mon Jun 27 04:12:21 EDT 2005


You should just be able to while (socket_read...) the data until you get the
complete packet, then wait till you get the last terminator and it should be
as fast as possible.

Good stuff.

- Plasma

----- Original Message -----
From: "Joe" <sechon at blackmud.com>
To: <bf1942 at icculus.org>
Sent: Monday, June 27, 2005 6:10 PM
Subject: RE: [bf1942] bf2 rcon php script


> Ah yeah had to sleep() a bit more, got it! Thanks!
>
> Updated the script package with a few minor tweaks including that.
>
> -----Original Message-----
> From: Andrew Armstrong [mailto:andrewa at bigpond.net.au]
> Sent: Monday, June 27, 2005 3:01 AM
> To: bf1942 at icculus.org
> Subject: Re: [bf1942] bf2 rcon php script
>
>
> As far as I know its not 'cut off', rather you are sent large packet
replies
> in segments, so you should wait to receive the next packet, or something
to
> that effect.
>
> Check the admin/default.py script for some explanation (x02 or x04 is the
> packet delimiter I think).
>
> - Plasma
>
> ----- Original Message -----
> From: "Joe" <sechon at blackmud.com>
> To: <bf1942 at icculus.org>
> Sent: Monday, June 27, 2005 5:42 PM
> Subject: [bf1942] bf2 rcon php script
>
>
> > Right off the bat, I have to say I'm not sure how risky this is as I
don't
> > check any data coming in from the forms, it's intended to just be a
> starting
> > point.
> >
> > A few notes - All three files have the same declarations in them. I
intend
> > to create a config file and include it in the future. I'm just very
> content
> > having a working php -> RCON connection! I can work the rest gradually
> now.
> > Having a ranked server, we're fairly limited what we can do so... Gotta
do
> > what ya can! bf2cc has no way to restrict user access yet and instead of
> > holding my breath on that junk I'd much rather use firefox..heh. If I
knew
> > some kind of gui language at all I think I'd have a nice remote manager!
> > Hehe..
> >
> >
> > A big note, and maybe a bf2 rcon bug: When the player list is requested,
> > it's cut off way early on the first output. In my script I request it
> twice
> > and combine the strings to get the correct player list.
> >
> > http://www.clanc.cc/bf2/bf2_kickban_rcon-php.tgz
> >
> > It's a complete mess, I already know! ;] If you do anything cool to it,
> I'd
> > be interested in seeing it as well.
> >
> > /eggs
> >
>




More information about the Bf1942 mailing list