Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2009-01-02 13:27
Size: 391 bytes
 

Contents

Class file image Download
<?php
include("class_cstrike.php");

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

$infoarrays $server->getInfo();

echo 
$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);
?>