Login   Register  
PHP Classes
elePHPant
Icontem

File: example/example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Shannon Wynter  >  Valve RCON  >  example/example.php  >  Download  
File: example/example.php
Role: Example script
Content type: text/plain
Description: A complete example for both Classic and Source
Class: Valve RCON
Manage remote game servers via RCON protocol
Author: By
Last change: Fixed File name / Description
Date: 2008-08-06 17:10
Size: 795 bytes
 

Contents

Class file image Download
<html>
<head>
<title> Valve RCON Example </title>
</head>
<body>
<h1> CS 1.6 Example </h1>
<h2> General Usage </h2>
<pre>
<?php
include('../valve_rcon.php');
$r = new Valve_RCON('hiworld''121.45.193.22'27015Valve_RCON::PROTO_CLASSIC);

$r->connect();
$r->authenticate();
echo 
$r->execute('status');
$r->disconnect();
?>
</pre>
<h2> Traditional Lazy Usage </h2>
<pre>
<?php
echo $r->execute('status');
?>
</pre>

<h1> CSS Example </h1>
<h2> General Usage </h2>
<pre>
<?php
$r 
= new Valve_RCON('hiworld''121.45.193.22'27016Valve_RCON::PROTO_SOURCE);

$r->connect();
$r->authenticate();
echo 
$r->execute('status');
$r->disconnect();
?>
</pre>
<h2> Traditional Lazy Usage </h2>
<pre>
<?php
echo $r->execute('status');
?>
</pre>
</body>
</html>