<?
// ------------------------------------------------------------------ // SAN ANDREAS: MULTIPLAYER GAME SERVER QUERY CLASS // ------------------------------------------------------------------ // Written by: Bogdan Zarchievici <opensource@creative-media.ro> // Version: 1.0.0.a // Revision: Thursday, Friday, May 19, 2006 at 5:46:45 PM // ------------------------------------------------------------------ // Comments: works with any PHP version greater than 4.1.0. // ------------------------------------------------------------------ // Special thanks to: Alexandru Burdulea and all of you who have been // actively interested in the development of this class. // ------------------------------------------------------------------ // For more details on MTA:SA please visit: // http://www.sa-mp.com // http://www.sa-mp.com/blog.php // http://www.sanandreas.ro // ------------------------------------------------------------------
error_reporting(E_ALL); ini_set("max_execution_time",5);
function version($current,$required) { list($current[3],$current[2],$current[1])=split('[/.-]',$current); list($required[3],$required[2],$required[1])=split('[/.-]',$required); if ($current[3]>$required[3]) return true; if ($current[3]<$required[3]) return false; if ($current[2]>$required[2]) return true; if ($current[2]<$required[2]) return false; if ($current[1]>=$required[1]) return true; return true; }
function call($class,$version) { if (version($version,"4.1.0")) { if (!include($class.'.php')) die('Please copy the PHP class in the current directory.'); } else { die('Current PHP version ['.$version.'] is too low for this class. You need PHP 4.1.0 or greater.'); }}
call('san-andreas-class',PHP_VERSION); $class=&new san_andreas($_GET['ip'],$_GET['port']); $status=get_object_vars($class);
include('templates/classic.php');
// 2 templates are currently available: // raw: displays the raw content returned by the PHP class; // classic: all the data returned by the class is nicely put into tables;
?>
|