Source for file Doom3.php
Documentation is available at Doom3.php
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Aidan Lister <aidan@php.net> |
// | Tom Buskens <ortega@php.net> |
// +----------------------------------------------------------------------+
// $Id: Doom3.php,v 1.10 2004/09/14 10:47:40 ortega Exp $
require_once 'Net\GameServerQuery\Protocol.php';
* @package Net_GameServerQuery
* @author Tom Buskens <ortega@php.net>
* @version $Revision: 1.10 $
* @return array Array containing formatted server response
if (!$this->_match("\xff\xffinfoResponse")) {
throw new Exception ('Parsing error');
// Probably a (protocol) version number
if ($this->_match(".{5}(.).(.)\x00")) {
throw new Exception ('Parsing error');
// Variable / value pairs
while ($this->_match("([^\x00]+)\x00([^\x00]*)\x00")) {
// End marker for variables?
if (!$this->_match("\x00\x00")) {
throw new Exception ('Parsing error');
// Players (ping and score in here somehwere)
while ($this->_match("(.)(..)(.)(.)(..)([^\x00]+)\x00")) {
// teams, either \x80\x3e or \x50\xc3
Documentation generated on Mon, 11 Mar 2019 13:58:55 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|