Source for file Unreal2XMP.php
Documentation is available at Unreal2XMP.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: Unreal2XMP.php,v 1.5 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.5 $
* @return array Array containing formatted server response
throw new Exception ('Parsing error');
// Init player id, needed for player properties
while ($this->_match("(.{4})(.{4})(.)")) {
// Player number & ID (never updated, bug?)
// Get player name length and create expression
$expr = sprintf("(.{%d})\x00(.{4})(.{4})(.{4})(.)", $name_length);
for ($i = 0; $i != $properties_number; $i++ ) {
// Get property name length
throw new Exception ('Parsing error');
$expr = sprintf("(.{%d})(.)", $name_length);
throw new Exception ('Parsing error');
// Get property value length
$expr = sprintf(".{%d}", $val_length);
throw new Exception ('Parsing error');
// Assign property value to a variable with property name
$this->_add($name . $player_id, $this->_match[0 ]);
Documentation generated on Mon, 11 Mar 2019 13:58:56 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|