PHP Classes

File: example/example.php

Recommend this page to a friend!
  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: 15 years ago
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', 27015, Valve_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', 27016, Valve_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>