Electronic Arts UK Community > Popular Games > Battlefield Series > Battlefield Bad Company 2 > Battlefield Bad Company 2 PC

Reply
 
LinkBack Thread Tools
Old 03-03-2010, 10:45 AM   #1 (permalink)
Rookie
 
Join Date: Aug 2008
Posts: 231
Default Is there a BC2 Server Status script?

I'm looking for a PHP script or something to provide BC2 server status on my website. Is there one available? My google search came up with nothing, but maybe there's a better way or wording it than "Bad Company 2 Server status".
Largo2 is offline   Reply With Quote
Old 03-03-2010, 01:51 PM   #2 (permalink)
Rookie
 
Kramerika's Avatar
 
Join Date: Jan 2010
Location: PA, US of A
Age: 40
Posts: 21
Default

www.gametracker.com

They added support for BC2 although the game doesn't currently support player scanning so you can't actually see who is playing on the server yet.

http://forums.gametracker.com/showthread.php?t=13949
Kramerika is offline   Reply With Quote
Old 03-03-2010, 02:03 PM   #3 (permalink)
Rookie
 
Join Date: Aug 2008
Posts: 231
Default

Thanks very much.
Would be nice to get a script though so we can do our own versions.
This will have to do for now. Ty.
Largo2 is offline   Reply With Quote
Old 03-03-2010, 02:57 PM   #4 (permalink)
Rookie
 
Join Date: Jan 2010
Location: Halifax Nova Scotia Canada
Age: 37
Posts: 77
Default

the other problem is that at least for me. i got to add in our clans server with the port and it can't find it..
Snake-Eyes2k3 is offline   Reply With Quote
Old 03-03-2010, 03:55 PM   #5 (permalink)
Rookie
 
Join Date: May 2009
Posts: 21
Default

I ported the python functions for querying the rcon protocol to php.

See line 106-116 for how to get playerlists if you have an rcon account

Code:
<?php

//
// This code is a port of the functions from http://static.cdn.ea.com/dice/u/f/bfbc2/Static/BFBC2_PC_Server_R3_519901_RemoteAdministration.zip
//

$ip = '';
$query_port = 48888; // rcon query port

$clientSequenceNr = 0;

function EncodeClientRequest($words)
{
    global $clientSequenceNr;
    $packet = EncodePacket(False, False, $clientSequenceNr, $words);
    $clientSequenceNr++;
    return $packet;
}

function EncodeHeader($isFromServer, $isResponse, $sequence)
{
    $header = $sequence & 0x3fffffff;
    if ($isFromServer)
        $header += 0x80000000;
    if ($isResponse)
        $header += 0x40000000;

    // Not tested this bit
        
    return pack('I', $header);
}

function DecodeHeader($data)
{
    $header = unpack('I', $data);    
    return array($header & 0x80000000, $header & 0x40000000, $header & 0x3fffffff);
}


function EncodeInt32($size)
{
    return pack('I', $size);
}

function DecodeInt32($data)
{
    $decode = unpack('I', $data);
    return $decode[1];
}
    

function EncodeWords($words)
{
    $size = 0;
    $encodedWords = '';
    foreach ($words as $word)
    {
        $strWord = $word;
        $encodedWords .= EncodeInt32(strlen($strWord));
        $encodedWords .= $strWord;
        $encodedWords .= "\x00";
        $size += strlen($strWord) + 5;
    }
    return array($size, $encodedWords);
}
    
function DecodeWords($size, $data)
{
    $numWords = DecodeInt32($data);        
    $offset = 0;    
    while ($offset < $size)
    {
        $wordLen = DecodeInt32(substr($data,$offset,4));
        $word = substr($data,$offset+4,$wordLen);
        $words[] = $word;
        $offset += $wordLen + 5;        
    }

    return $words;
}

function EncodePacket($isFromServer, $isResponse, $sequence, $words)
{
    $words = explode(' ',$words);
    $encodedHeader = EncodeHeader($isFromServer, $isResponse, $sequence);        
    $encodedNumWords = EncodeInt32(count($words));    
    list($wordsSize, $encodedWords) = EncodeWords($words);
    $encodedSize = EncodeInt32($wordsSize + 12);    
    return $encodedHeader . $encodedSize . $encodedNumWords . $encodedWords;
}

function DecodePacket($data)
{
    list($isFromServer, $isResponse, $sequence) = DecodeHeader($data);
    $wordsSize = DecodeInt32(substr($data,4,4)) - 12;
    $words = DecodeWords($wordsSize, substr($data,12));
    return array($isFromServer, $isResponse, $sequence, $words);
}

$sock = fsockopen( "tcp://" . $ip, $query_port);
if($sock != false)
{
    socket_set_timeout($sock, 0, 500000);
    fwrite($sock,EncodeClientRequest("serverInfo")); // OK, serverName, current playercount, max playercount , gamemode, map    
    list($isFromServer, $isResponse, $sequence, $words) = DecodePacket(fread($sock, 4096));

    print_r($words);    
    
    /*
    //  If its your server you could add 
    //
    //  fwrite($sock,EncodeClientRequest("login.plainText PASSWORD"));
    //  list($isFromServer, $isResponse, $sequence, $words) = DecodePacket(fread($sock, 4096));
    //
    //  fwrite($sock,EncodeClientRequest("admin.listPlayers all));
    //  list($isFromServer, $isResponse, $sequence, $words) = DecodePacket(fread($sock, 4096)); // clantag, player name, squadID, teamID
    //
    //  Then $words contains an array of players on the server (I havn't tested this as I don't have a server to test on)
    */        
    
    fwrite($sock,EncodeClientRequest("quit"));
    list($isFromServer, $isResponse, $sequence, $words) =  DecodePacket(fread($sock, 4096));  
    fclose($sock);
}
?>

Last edited by XxMASTERUKxX; 07-04-2010 at 10:44 PM. Reason: CyboPat's fix for playerlist
XxMASTERUKxX is offline   Reply With Quote
Old 03-03-2010, 11:47 PM   #6 (permalink)
Rookie
 
Join Date: Aug 2008
Posts: 231
Default

Excellent work. I'll knock something up using this tomorrow morning before my game arrives.
Largo2 is offline   Reply With Quote
Old 06-03-2010, 06:52 PM   #7 (permalink)
Rookie
 
Join Date: Jan 2010
Posts: 66
Default

I would LOOOVVVEEE to see this script in either vb or c#!! .. Pleaseeee!

I have no knowledge to php or python.

HEELP!!!!
Mojo_number1 is offline   Reply With Quote
Old 06-03-2010, 11:49 PM   #8 (permalink)
Rookie
 
Join Date: Mar 2010
Posts: 15
Default

Quote:
Originally Posted by XxMASTERUKxX View Post
I ported the python functions for querying the rcon protocol to php.

See line 106-116 for how to get playerlists if you have an rcon account

Code:
<pre><?php

//
// This code is a port of the functions from http://static.cdn.ea.com/dice/u/f/bfbc2/Static/BFBC2_PC_Server_R3_519901_RemoteAdministration.zip
//

....
    fwrite($sock,EncodeClientRequest("quit"));
    list($isFromServer, $isResponse, $sequence, $words) =  DecodePacket(fread($sock, 4096));  
    fclose($sock);
}
?>
great work

1. fwrite($sock,EncodeClientRequest("admin.listPlayer s"));
...here is little bug, missing char "

2. fwrite($sock,EncodeClientRequest("admin.listPlayer s all"));
...and if you want get list of players, you need put subparameter:
all/team/squad

Last edited by CyboPat; 07-03-2010 at 01:55 AM.
CyboPat is offline   Reply With Quote
Old 07-03-2010, 12:38 AM   #9 (permalink)
Rookie
 
Join Date: May 2009
Posts: 21
Default

Many thanks CyboPat I didn't notice the player subset required parameter.
XxMASTERUKxX is offline   Reply With Quote
Old 07-03-2010, 01:06 AM   #10 (permalink)
Rookie
 
Join Date: Aug 2008
Posts: 231
Default

I discovered this a couple of days ago but forgot to post it.

It does work too, but it dumps it in an array which is awkward to manage.
I used a for loop. I've only just started using PHP, so I'm sure there's a better way of doing this.

Quote:
$elements = count($words)-1;
for($i=0;$i<$elements;$i=$i+4)
{
echo $words[1+$i];
echo " ";
echo $words[2+$i];
echo " ";
echo $words[3+$i];
echo " ";
echo $words[4+$i];
echo "<br />";
}
I'd like to organise these into a side by side table by teams and possibly squads, but unsure how to do that yet. I'll have to do some research and some trial and error.
Also, bare in mind that the above code was made for testing, it's not exactly what I will use. for example, only one echo is needed. It just helps me find where errors are.
Largo2 is offline   Reply With Quote
Old 07-03-2010, 01:27 AM   #11 (permalink)
Rookie
 
Join Date: May 2009
Posts: 21
Default

Play around with this,

Code:
$players = array_chunk($words, 4);

foreach ($players as $p)
{
     $teams[$p[3]][$p[2]][] = $p[0].$p[1];
}

print_r($teams);
Should have $teams[0] and $teams[1] with squads, which can be put in a foreach and echo'd

Mike

Last edited by XxMASTERUKxX; 07-03-2010 at 01:31 AM.
XxMASTERUKxX is offline   Reply With Quote
Old 07-03-2010, 01:50 AM   #12 (permalink)
Rookie
 
Join Date: Jan 2010
Posts: 80
Default

Great, thanks!
SavageCore is offline   Reply With Quote
Old 07-03-2010, 01:51 AM   #13 (permalink)
Rookie
 
Join Date: Mar 2010
Posts: 15
Default

work in progress...
http://www.eas-clan.cz/?p=server-info&server=1

Last edited by CyboPat; 23-03-2010 at 09:09 AM. Reason: change url
CyboPat is offline   Reply With Quote
Old 07-03-2010, 11:40 AM   #14 (permalink)
Rookie
 
Join Date: Aug 2008
Posts: 231
Default

Nice work by everyone imo.

I'd ask for your code CyboPat, but I want to get it done myself as a way to learn PHP a little more xD

Thanks for that better way of doing it Mike, I'll have a play with that, just need to get the server populated now.
Largo2 is offline   Reply With Quote
Old 10-03-2010, 01:10 PM   #15 (permalink)
Rookie
 
Join Date: Jan 2010
Posts: 80
Default

Play with this for a nice table. I do however get a squad of 24 come up with some people... :S

Code:
    echo ' <table>' . "\n";
    echo '  <thead class="left"><tr><th>Name</th><th>Team</th><th>Squad</th></tr></thead>' . "\n";
    echo '  <tbody class="left">' . "\n";
    $elements = count($players)-1;
    for($i=0;$i<$elements;$i=$i+4)
    {
                echo '   <tr>';
                echo '<td>' . $players[1+$i] . ' ' . $players[2+$i] . '</td>';
                echo '<td>' . $players[4+$i] . '</td>';
                echo '<td>' . $players[3+$i] . '</td>';
                echo '</tr>' . "\n";
    }
        echo '  </tbody>' . "\n";
        echo ' </table>' . "\n";
My WIP: Clan Phoenix

Last edited by SavageCore; 10-03-2010 at 01:54 PM.
SavageCore is offline   Reply With Quote
Old 14-03-2010, 04:58 AM   #16 (permalink)
Rookie
 
Join Date: Jul 2009
Posts: 6
Default

How do you get scores from rcon is it something that has to be messaged by the server?
colk is offline   Reply With Quote
Old 14-03-2010, 08:51 AM   #17 (permalink)
Rookie
 
Join Date: Jan 2010
Posts: 66
Default

Quote:
Originally Posted by colk View Post
How do you get scores from rcon is it something that has to be messaged by the server?
Only way you can do it at the moment (as far as I know), is to listen to events from the server (player.onKill) and then do you own math.


Mojo
Mojo_number1 is offline   Reply With Quote
Old 14-03-2010, 10:42 PM   #18 (permalink)
Rookie
 
Join Date: Aug 2008
Posts: 231
Default

Quote:
Originally Posted by SavageCore View Post
Play with this for a nice table. I do however get a squad of 24 come up with some people... :S

Code:
    echo ' <table>' . "\n";
    echo '  <thead class="left"><tr><th>Name</th><th>Team</th><th>Squad</th></tr></thead>' . "\n";
    echo '  <tbody class="left">' . "\n";
    $elements = count($players)-1;
    for($i=0;$i<$elements;$i=$i+4)
    {
                echo '   <tr>';
                echo '<td>' . $players[1+$i] . ' ' . $players[2+$i] . '</td>';
                echo '<td>' . $players[4+$i] . '</td>';
                echo '<td>' . $players[3+$i] . '</td>';
                echo '</tr>' . "\n";
    }
        echo '  </tbody>' . "\n";
        echo ' </table>' . "\n";
My WIP: Clan Phoenix
Squad 24 is no squad

Got mine working nicely but the squad names are jumbled. I have a few ideas how to fix it.
Server Status
Largo2 is offline   Reply With Quote
Old 19-03-2010, 12:40 AM   #19 (permalink)
Rookie
 
sirshaw's Avatar
 
Join Date: Jun 2007
Age: 29
Posts: 12
Send a message via ICQ to sirshaw Send a message via AIM to sirshaw Send a message via MSN to sirshaw Send a message via Yahoo to sirshaw
Default

can someone be nice and post some completed code? I can tinker with php but this is a bit beyond me. all im getting is:

http://www.knightsofkarbala.com/bc2serverscript.php
sirshaw is offline   Reply With Quote
Old 19-03-2010, 01:34 AM   #20 (permalink)
Rookie
 
Fabryz's Avatar
 
Join Date: Jan 2010
Location: Italy
Posts: 164
Default

Will we ever be able to see BFBC2 on game-monitor?
__________________
Config:
  • Intel Core2Duo P8600 2.40GHz
  • 4GB RAM
  • GeF 9600M GT 512MB
  • Win Vista 32bit
  • 17"@1440x900
Fabryz is offline   Reply With Quote
Old 22-03-2010, 04:47 PM   #21 (permalink)
Rookie
 
Join Date: Mar 2010
Posts: 10
Default

here is the full working code i made, already colored and styled for you, i tried to make it kinda look bc2 style :P

in the script.. find 'yourip' 'yourport' and 'yourpass' and replace it with the proper info sorry its a bit scattered in the script lol.

if you want to see an example just visit our website FreeFrag.com Free Frag Network BFBC2 BC2 TF2 Bad Company 2 Team Fortress 2 Community FFN

or look at this picture



PHP Code:
<style>
table.stats 
{text-align: center;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif ;
font-weight: normal;
font-size: 11px;
color: #fff;
width: 280px;
background-color: #666;
border: 0px;
border-collapse: collapse;
border-spacing: 0px;}

table.stats td 
{background-color: #CCC;
color: #000;
padding: 4px;
text-align: left;
border: 1px #fff solid;}

table.stats td:hover 
{background-color: #625D5D;
color: #FFF;
padding: 4px;
text-align: left;
border: 1px #fff solid;}

table.stats td.hed
{background-color: #666;
color: #fff;
padding: 4px;
text-align: left;
border-bottom: 2px #fff solid;
font-size: 12px;
font-weight: bold;}

table.stats2 
{text-align: center;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif ;
font-weight: normal;
font-size: 11px;
color: #fff;
width: 560px;
background-color: #666;
border: 0px;
border-collapse: collapse;
border-spacing: 0px;}

table.stats2 td 
{background-color: #CCC;
color: #000;
padding: 4px;
text-align: center;
border: 1px #fff solid;}

table.stats2 td:hover 
{background-color: #625D5D;
color: #FFF;
padding: 4px;
text-align: center;
border: 1px #fff solid;}


table.stats2 td.hed
{background-color: #666;
color: #fff;
padding: 4px;
text-align: left;
border-bottom: 2px #fff solid;
font-size: 12px;
font-weight: bold;}
</style>

<?php
echo "<table class=stats2 border=1>";
echo 
'  <thead class="left"><tr><th colspan="6">Server Info</th></tr></thead>' "\n";
echo 
'  <thead class="left"><tr><th>Hostname</th><th>Players</th><th>Mode</th><th>Map</th></tr></thead>' "\n";
//
// This code is a port of the functions from http://static.cdn.ea.com/dice/u/f/bfbc2/Static/BFBC2_PC_Server_R3_519901_RemoteAdministration.zip
//

$ip 'yourip';
$query_port yourport// rcon query port

$clientSequenceNr 0;

function 
EncodeClientRequest($words)
{
    
$packet EncodePacket(FalseFalse$clientSequenceNr$words);
    
$clientSequenceNr++;
    return 
$packet;
}

function 
EncodeHeader($isFromServer$isResponse$sequence)
{
    
$header $sequence 0x3fffffff;
    if (
$isFromServer)
        
$header += 0x80000000;
    if (
$isResponse)
        
$header += 0x40000000;

    
// Not tested this bit
        
    
return pack('I'$header);
}

function 
DecodeHeader($data)
{
    
$header unpack('I'$data);    
    return array(
$header 0x80000000$header 0x40000000$header 0x3fffffff);
}


function 
EncodeInt32($size)
{
    return 
pack('I'$size);
}

function 
DecodeInt32($data)
{
    
$decode unpack('I'$data);
    return 
$decode[1];
}
    

function 
EncodeWords($words)
{
    
$size 0;
    
$encodedWords '';
    foreach (
$words as $word)
    {
        
$strWord $word;
        
$encodedWords .= EncodeInt32(strlen($strWord));
        
$encodedWords .= $strWord;
        
$encodedWords .= "\x00";
        
$size += strlen($strWord) + 5;
    }
    return array(
$size$encodedWords);
}
    
function 
DecodeWords($size$data)
{
    
$numWords DecodeInt32($data);        
    
$offset 0;    
    while (
$offset $size)
    {
        
$wordLen DecodeInt32(substr($data,$offset,4));
        
$word substr($data,$offset+4,$wordLen);
        
$words[] = $word;
        
$offset += $wordLen 5;        
    }

    return 
$words;
}

function 
EncodePacket($isFromServer$isResponse$sequence$words)
{
    
$words explode(' ',$words);
    
$encodedHeader EncodeHeader($isFromServer$isResponse$sequence);        
    
$encodedNumWords EncodeInt32(count($words));    
    list(
$wordsSize$encodedWords) = EncodeWords($words);
    
$encodedSize EncodeInt32($wordsSize 12);    
    return 
$encodedHeader $encodedSize $encodedNumWords $encodedWords;
}

function 
DecodePacket($data)
{
    list(
$isFromServer$isResponse$sequence) = DecodeHeader($data);
    
$wordsSize DecodeInt32(substr($data,4,4)) - 12;
    
$words DecodeWords($wordsSizesubstr($data,12));
    return array(
$isFromServer$isResponse$sequence$words);
}

$sock fsockopen"tcp://" $ip$query_port);
if(
$sock != false)
{
    
socket_set_timeout($sock0500000);
    
fwrite($sock,EncodeClientRequest("serverInfo")); // OK, serverName, current playercount, max playercount , gamemode, map    
    
list($isFromServer$isResponse$sequence$words) = DecodePacket(fread($sock4096));
$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+5)
{
echo 
'<tr>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $words[2+$i] . '/' $words[3+$i] . '</td>';
echo 
'<td>' $words[4+$i] . '</td>';
echo 
'<td>' $words[5+$i] . '</td>';
echo 
'</tr>' "\n";
   
echo 
"</table>";
}
    
fwrite($sock,EncodeClientRequest("login.plainText yourpass"));
    list(
$isFromServer$isResponse$sequence$words) = DecodePacket(fread($sock4096));
       
    
fwrite($sock,EncodeClientRequest("admin.listPlayers all"));
    list(
$isFromServer$isResponse$sequence$words) = DecodePacket(fread($sock4096)); // clantag, player name, squadID, teamID
echo "<table>";
echo 
' <table border=1 align=left class="stats">' "\n";
                echo 
'  <thead class="left"><tr><th colspan="3">Attacker</th></tr></thead>' "\n";
                echo 
'  <thead class="left"><tr><th>Name</th><th>Clantag</th><th>Squad</th></tr></thead>' "\n";
               echo 
'  <tbody class="left">' "\n";    
$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 1) {
$Squad "Alpha";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 1) {
$Squad "Bravo";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}

$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 2) {
$Squad "Charlie";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 3) {
$Squad "Delta";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 4) {
$Squad "Echo";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 5) {
$Squad "Foxtrot";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 6) {
$Squad "Golf";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 7) {
$Squad "Hotel";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
$elements count($words)-1;
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 24) {
$Squad "No Squad";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
        echo 
'  </tbody>' "\n";
        echo 
' </table>' "\n";
echo 
' <table border=1 align=left class="stats">' "\n";
                echo 
'  <thead class="left"><tr><th colspan="3">Defenders</th></tr></thead>' "\n";
                echo 
'  <thead class="left"><tr><th>Name</th><th>Clantag</th><th>Squad</th></tr></thead>' "\n";
               echo 
'  <tbody class="left">' "\n";
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 0) {
$Squad "Alpha";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 1) {
$Squad "Bravo";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 2) {
$Squad "Charlie";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 3) {
$Squad "Delta";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 4) {
$Squad "Echo";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 5) {
$Squad "Foxtrot";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 6) {
$Squad "Golf";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 7) {
$Squad "Hotel";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
for(
$i=0;$i<$elements;$i=$i+4)
{
if (
$words[4+$i] == && $words[3+$i] == 24) {
$Squad "No Squad";
echo 
'<tr>';
echo 
'<td>' $words[2+$i] . '</td>';
echo 
'<td>' $words[1+$i] . '</td>';
echo 
'<td>' $Squad '</td>';
echo 
'</tr>' "\n";
}
}
        echo 
'  </tbody>' "\n";
        echo 
' </table>' "\n";
        echo 
"</table>";      
    
fwrite($sock,EncodeClientRequest("quit"));
    list(
$isFromServer$isResponse$sequence$words) =  DecodePacket(fread($sock4096));  
    
fclose($sock);
}
?>
Inflik is offline   Reply With Quote
Old 22-03-2010, 11:32 PM   #22 (permalink)
Rookie
 
Join Date: Mar 2010
Posts: 15
Default

DOWNLOAD: http://www.cybopat.net/bc2/bc2_server_infoview.zip

ENJOY!

example: EAS - Elite Assault Shooters
CyboPat is offline   Reply With Quote
Old 23-03-2010, 02:10 AM   #23 (permalink)
Rookie
 
Join Date: Mar 2010
Posts: 76
Default

Thanks ALOT!!
ShortnStubby is offline   Reply With Quote
Old 25-03-2010, 10:33 PM   #24 (permalink)
Forum Guru
 
Join Date: Mar 2010
Posts: 1,765
Default

Changed what was needed but when I try and connect I get this:

Warning: fsockopen() [function.fsockopen]: unable to connect to tcp://68.232.181.105:48888 (Connection refused)


Any clue?
__________________
HarryNutz_PnB is offline   Reply With Quote
Old 25-03-2010, 11:10 PM   #25 (permalink)
Rookie
 
Join Date: Mar 2010
Posts: 76
Default

Quote:
Originally Posted by _JB_Mortician View Post
Changed what was needed but when I try and connect I get this:

Warning: fsockopen() [function.fsockopen]: unable to connect to tcp://68.232.181.105:48888 (Connection refused)


Any clue?
um...webserver is blocking outgoing access on port 48888 ? just a stab in the dark...kind of need more details i run an apache http server with php and mysql and perl and works great
__________________
ShortnStubby is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:25 AM.

EA - Top

Powered by Searchlight Copyright ©2006 - 2012 Axivo Inc.