Asa.. deci .. aveti server de gunZOnline .. si vrei sa aveti pe site server status faceti urmatoaterele
intrati in C:\Appserver\www si creati un nou php cu numele server.php
si copiati codul urmator in el
Sper sa va fie de folos :-|
intrati in C:\Appserver\www si creati un nou php cu numele server.php
si copiati codul urmator in el
- Cod:
<?php
$srvip = "XxXxXx";
$srvport = "6000";
$mssql_user = "starmedia";
$mssql_pass = "starmedia";
$mssql_database = "GunzDB";
$mssql_host = "LOCALMACHINE\SQLEXPRESS";
$conn = mssql_connect($mssql_host, $mssql_user, $mssql_pass);
mssql_select_db($mssql_database);
echo "<br><B>Server Status:</B> ";
$fp = @fsockopen($srvip, $srvport, $errno, $errstr, 1);
if (!$fp) {
echo "<font><B>Offline</B></font></br>";
} else {
echo "<font><B>Online</B></font></br>";
fclose($fp);
}
// Função Anti Injection
function anti_injection($sql)
{
$sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql);
$sql = trim($sql);
$sql = strip_tags($sql);
$sql = addslashes($sql);
return $sql;
}
Sper sa va fie de folos :-|