Значи намерих си нов скрипт за статуса на сървъра.Как да сложа този скрипт в обкиновен html.То към този скрипт има и config.php.Как да сложа така че да пробаца???Ето страницата да видите как е: www.filesbg.com/wowserver/ .Моля ви кажете как да сложа скрипта така че да ми излиза като нормална страница която показва onlline и οffline.Плс хелп
Код:
<?
//////////////////////////////////////
// Statistik Script by I-Web Design //
// -------------------------------- //
// Contact: webmaster@michieru.de //
// Homepage: www.michieru.de //
// //
// Using: //
// You can use the Script for free //
// and edit it in all places. Only //
// keep this head-copyright on each //
// site of this script. //
// See info.txt for more details!!! //
//////////////////////////////////////
//Database
//////////
$dbhost="82.199.197.194:8080"; //Host/IP from the MySQL Database
$dbname="l2jdb2"; //Name of Database (in many times it is 'l2jdb')
$dbuser=""; //Username to the MySQL Database
$dbpass=""; //Passwort to the MySQL Database
$config['config_script_name']="Private Server"; //Here you can wrote you name from the Homepage / Clan or something.
//It will be displayed on the Top
$config['config_map_quality']="middle"; //Quality of the Map and size
//"low" = Low quality and size (this can reduce the traffic of the server)
//"middle" = Middle quality and size (this looks good on 1280x1024 resolution)
//"high" = High quality and size (this is a detailed map but more traffic)
//
//Notice: Whole-Map is always "low" quality
$config['server_path']="Z:/l2j-server/l2j/dataannouncements.txt"; //Full path to the announcements.txt.
//example:
//Windows = C:/server/l2j-server/data/announcements.txt
//Linux = /usr/server/l2j-server/data/announcements.txt
///////////////////////////////////////////////////////////////////////////////////////////////////
//Dont edit behind this line///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
$verbindung=MYSQL_CONNECT($dbhost,$dbuser,$dbpass) or die ("Datenbankserver nicht erreichbar");
MYSQL_SELECT_DB($dbname) or die ("Datenbank nicht vorhanden");
$get_config_data="SELECT online FROM characters WHERE online>0";
$config_data=MYSQL_QUERY($get_config_data);
$config['num_online']=mysql_num_rows($config_data);
//$handle = fopen("http://www.whatismyip.com/", "r");
//$contents = '';
//while (!feof($handle)){$contents .= fread($handle, 8192);}
//fclose($handle);
//preg_match( "/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/", $contents, $matches );
//$config['server_ip']=$matches[0];
$config['server_ip']=$_SERVER["HTTP_HOST"];
error_reporting(0);
$IP = array(
"login_server" => "82.199.197.194:8080",
"game_server" => "82.199.197.194:8080",
);
while(list($ServerName,$Host)=each($IP))
{
list($IPAddress,$Port)=explode(":",$Host);
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5))
{
$config[$ServerName]="<font color=\"#00ff00\">Online</font>";
fclose($fp);
}else{
$config[$ServerName]="<font color=\"#ff0000\">Offline</font>";
}
}
mysql_close($verbindung);
?>