PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Markus Schanz   Counter-Strike   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Short example on how to use the class
Class: Counter-Strike
Retrieve information from a Counter-Strike server
Author: By
Last change:
Date: 14 years ago
Size: 391 bytes


Class file image Download

$server = new cstrike("", 27100);

$infoarrays = $server->getInfo();

$infoarrays["serverinfo"]["servername"] . " has " . $infoarrays["serverinfo"]["player_cur"] . "/" . $infoarrays["serverinfo"]["player_max"] . " players!";

// Uncomment for the full data array, view source of the page to see it!
// print_r($infoarrays);