Skip to content

Commit 266cf6a

Browse files
committed
Add Arma 3
1 parent 13b291a commit 266cf6a

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# PHP Source Query
22

33
## Description
4-
This class was created to query game server which use the Source query protocol, this includes all source games, half-life 1 engine games and Call of Duty: Modern Warfare 3
4+
This class was created to query game server which use the Source query protocol, this includes all source games, and all the games that implement Steamworks.
55

66
The class also allows you to query servers using RCON although this only works for half-life 1 and source engine games.
77

@@ -17,8 +17,8 @@ The class also allows you to query servers using RCON although this only works f
1717
* [The Ship](http://store.steampowered.com/app/2400/)
1818
* [Dino D-Day](http://store.steampowered.com/app/70000/)
1919
* [Nuclear Dawn](http://store.steampowered.com/app/17710/)
20-
* [Just Cause 2: Multiplayer Mod](http://store.steampowered.com/app/259080/)
2120
* [Call of Duty: Modern Warfare 3](http://store.steampowered.com/app/115300/)
21+
* [Arma 3](http://store.steampowered.com/app/107410/) *(add +1 to the server port, their implementation also violates Source query protocol spec.)*
2222
* [Minecraft](http://www.minecraft.net/) **(RCON ONLY!)**
2323
* *and many other games that implement Source Query Protocol*
2424

SourceQuery/SourceQuery.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ public function GetPlayers( )
350350
case self :: GETCHALLENGE_ALL_CLEAR:
351351
{
352352
$this->Socket->Write( self :: A2S_PLAYER, $this->Challenge );
353-
$this->Socket->Read( );
353+
$this->Socket->Read( 14000 ); // Moronic Arma 3 developers do not split their packets, so we have to read more data
354+
// This violates the protocol spec, and they probably should fix it: https://developer.valvesoftware.com/wiki/Server_queries#Protocol
354355

355356
$Type = $this->Buffer->GetByte( );
356357

View.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<div class="jumbotron">
6060
<h1>Source Query PHP Class</h1>
6161

62-
<p>This class was created to query game server which use the Source query protocol, this includes all source games, half-life 1 engine games and Call of Duty: Modern Warfare 3</p>
62+
<p>This class was created to query game server which use the Source (Steamworks) query protocol.</p>
6363

6464
<p>
6565
<a class="btn btn-large btn-primary" href="http://xpaw.me">Made by xPaw</a>
@@ -114,14 +114,18 @@
114114
<table class="table table-bordered table-striped">
115115
<thead>
116116
<tr>
117-
<th>Players</th>
117+
<th>Player</th>
118+
<th>Frags</th>
119+
<th>Time</th>
118120
</tr>
119121
</thead>
120122
<tbody>
121123
<?php if( Is_Array( $Players ) ): ?>
122124
<?php foreach( $Players as $Player ): ?>
123125
<tr>
124126
<td><?php echo htmlspecialchars( $Player[ 'Name' ] ); ?></td>
127+
<td><?php echo $Player[ 'Frags' ]; ?></td>
128+
<td><?php echo $Player[ 'TimeF' ]; ?></td>
125129
</tr>
126130
<?php endforeach; ?>
127131
<?php else: ?>

0 commit comments

Comments
 (0)