cvs: pear /Net_GameServerQuery/docs/examples example1.php example2.php example3.php

From: Date: Sat, 22 Jan 2005 03:25:11 +0000
Subject: cvs: pear /Net_GameServerQuery/docs/examples example1.php example2.php example3.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-28736@lists.php.net to get a copy of this message
aidan Fri Jan 21 22:25:11 2005 EDT Modified files: /pear/Net_GameServerQuery/docs/examples example1.php example2.php example3.php Log: Used full package name http://cvs.php.net/diff.php/pear/Net_GameServerQuery/docs/examples/example1.php?r1=1.16&r2=1.17&ty=u Index: pear/Net_GameServerQuery/docs/examples/example1.php diff -u pear/Net_GameServerQuery/docs/examples/example1.php:1.16 pear/Net_GameServerQuery/docs/examples/example1.php:1.17 --- pear/Net_GameServerQuery/docs/examples/example1.php:1.16 Fri Jan 14 09:41:12 2005 +++ pear/Net_GameServerQuery/docs/examples/example1.php Fri Jan 21 22:25:11 2005 @@ -1,13 +1,14 @@ <html> <head> - <title>Net_GSQ Example 1: Basics</title> + <title>Net_GameServerQuery Example 1: Basics</title> </head> <body> +<h1>Net_GameServerQuery Example 1: Basics</h1> <p>This example shows the basic usage of Net_GameServerQuery.</p> <p>We retrieve rules, status and players from two servers.</p> <pre> <?php -require 'Net/GameServerQuery.php'; +require_once 'Net/GameServerQuery.php'; // load class $gsq = new Net_GameServerQuery; @@ -17,10 +18,11 @@ $gsq->addServer('halflife', '202.173.159.8', null, 'rules|status|players'); // execute -$result = $gsq->execute(100); +$result = $gsq->execute(); // results print_r($result); + ?> </pre> </body> http://cvs.php.net/diff.php/pear/Net_GameServerQuery/docs/examples/example2.php?r1=1.3&r2=1.4&ty=u Index: pear/Net_GameServerQuery/docs/examples/example2.php diff -u pear/Net_GameServerQuery/docs/examples/example2.php:1.3 pear/Net_GameServerQuery/docs/examples/example2.php:1.4 --- pear/Net_GameServerQuery/docs/examples/example2.php:1.3 Sat Jan 15 09:17:11 2005 +++ pear/Net_GameServerQuery/docs/examples/example2.php Fri Jan 21 22:25:11 2005 @@ -1,17 +1,18 @@ <html> <head> - <title>Net_GSQ Example 2: Using protocol parsers</title> + <title>Net_GameServerQuery Example 2: Using protocol parsers</title> </head> <body> +<h1>Net_GameServerQuery Example 2: Using protocol parsers</h1> <p>This example shows how the protocol parsers can be accessed with Net_GameServerQuery.</p> <p>We convert a rules, status and players sample request into parsed data.</p> <p>This example requires <em>examplepackets.php</em> to be in the same directory.</p> <pre> <?php -require 'Net/GameServerQuery.php'; +require_once 'Net/GameServerQuery.php'; // Raw packets from the server -require_once 'examplepackets.php'; +require 'examplepackets.php'; // Load HalfLife protocol $parser = Net_GameServerQuery_Process::factory('HalfLife'); http://cvs.php.net/diff.php/pear/Net_GameServerQuery/docs/examples/example3.php?r1=1.2&r2=1.3&ty=u Index: pear/Net_GameServerQuery/docs/examples/example3.php diff -u pear/Net_GameServerQuery/docs/examples/example3.php:1.2 pear/Net_GameServerQuery/docs/examples/example3.php:1.3 --- pear/Net_GameServerQuery/docs/examples/example3.php:1.2 Fri Jan 14 13:57:01 2005 +++ pear/Net_GameServerQuery/docs/examples/example3.php Fri Jan 21 22:25:11 2005 @@ -1,13 +1,14 @@ <html> <head> - <title>Net_GSQ Example 3: Accessing communication classes</title> + <title>Net_GameServerQuery Example 3: Accessing communication classes</title> </head> <body> +<h1>Net_GameServerQuery Example 3: Accessing communication classes</h1> <p>This example shows how the communication class manually with Net_GameServerQuery.</p> <p>We ask a Half-Life server for its status.</p> <pre> <?php -require 'Net/GameServerQuery.php'; +require_once 'Net/GameServerQuery.php'; // Get the packet to send $cfg = new Net_GameServerQuery_Config;

« previous php.pear.cvs (#28736) next »