Skip to content
La2Base
Home
DownloadsWikiForumFAQ
ruen
Sign up Login
HomeFilesWikiLogin
  • Home
  • Downloads
  • Wiki
  • FAQ
  • Contact Us
  • About
  • Rules
  • Privacy
  • Terms of Service

© 2026 la2base.com · All rights reserved

ruen
Forum/Веб обвязка/Скрипт Status
Search

Скрипт Status

8 replies243 viewsCurrently viewing: 1
Женя
Женя

User

Бывалый

Posts: 174

На форуме с: 11/16/2007

Репутация: +33

Рейтинг: 0

· 05/11/2008, 11:23 AM

Прошу выложиет скрипт на стстус сервака,имеющийся у мя непоказывает онлай сервер или нет,на ява скриптах,прошу под яву скрипты статус :)

0
Hoky
Hoky

User

Бывалый

Posts: 167

На форуме с: 03/27/2008

Репутация: +117

Рейтинг: 0

· 05/11/2008, 06:38 PM

на эве вроде нету, попробуй

Войдите и наберите 1 постов

0
Женя
Женя

User

Бывалый

Posts: 174

На форуме с: 11/16/2007

Репутация: +33

Рейтинг: 0

· 05/11/2008, 06:45 PM

Битая ссылка,перезалей плиз!!!

0
Hoky
Hoky

User

Бывалый

Posts: 167

На форуме с: 03/27/2008

Репутация: +117

Рейтинг: 0

· 05/11/2008, 07:29 PM

Перезаливать нечего. ТАм было так : вводишь ip, port и тебе дают скрипт и ты его просто вставляешь на сайт, на юкозе работало

0
Женя
Женя

User

Бывалый

Posts: 174

На форуме с: 11/16/2007

Репутация: +33

Рейтинг: 0

· 05/12/2008, 04:16 AM

Мне нужен скрипт mssql который!

0
M
max!e

Author

Новичок

Posts: 19

На форуме с: 04/20/2008

Репутация: +35

Рейтинг: 0

· 05/12/2008, 04:50 AM

CODE
<style type="text/css">

.tabela {
background: #000000;
background-color: #000000;
font-size: 12px;

}

.tabelatitle {
background-color: #000000;
font-size: 14px;
font-weight: bold;

}

body {
background-color: #000000;
color: #FFFFFF;
font-family: tahoma;
font-size: 19px;
}

</style>


<body>
<?php

////Статус сервера//////

error_reporting(0);
$IP = array(
"Login Server: " => "127.0.0.1:2108",
"Game Server: " => "127.0.0.1:7777",
); while(list($ServerName,$Host)=each($IP)) {
list($IPAddress,$Port)=explode(":",$Host);
echo($ServerName);
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5)) {
echo'ON<br>';
fclose($fp);
}
else {
echo'OFF<br>';
}
}
?>




<?php

require 'config.php';

mssql_connect($mssql_server,$mssql_user,$mssql_pass);
mssql_select_db($mssql_db);

$result=mssql_query("
select a.char_name, a.Lev, a.builder, a.class, a.use_time,
a.PK, a.Duel, a.gender, b.name, a.Exp, b.pledge_id
from user_data as a
left join pledge as b on a.Pledge_id=b.pledge_id
where char_name not in (".("'".join("','",$exclude_from_top)."'").") and (login>logout) and (builder>=0)");
$online_count=mssql_num_rows($result);

$result=mssql_query("
select a.char_name, a.Lev, a.builder, a.class, a.use_time,
a.PK, a.Duel, a.gender, b.name, a.Exp, b.pledge_id
from user_data as a
left join pledge as b on a.Pledge_id=b.pledge_id
where char_name not in (".("'".join("','",$exclude_from_top)."'").") and (login>logout) and (builder>=0)");


$d_count = 0;
$de_count = 0;
$e_count = 0;
$h_count = 0;
$o_count = 0;
$online_users=array();
for ($x=0;$online_users[$x]=mssql_fetch_assoc($result);$x++)
{
$hours=round($online_users[$x]['use_time']/3600,1);
$online_users[$x]['use_time_d']=floor($hours/24)." дн. ".($hours % 24)." ч.";
if ($online_users[$x]['class'] >= 0 && $online_users[$x]['class'] <= 17) $h_count++;
if ($online_users[$x]['class'] >= 18 && $online_users[$x]['class'] <= 30) $e_count++;
if ($online_users[$x]['class'] >= 31 && $online_users[$x]['class'] <= 43) $de_count++;
if ($online_users[$x]['class'] >= 44 && $online_users[$x]['class'] <= 52) $o_count++;
if ($online_users[$x]['class'] >= 53 && $online_users[$x]['class'] <= 57) $d_count++;
}
unset($online_users[count($online_users)-1]);

mssql_connect($mssql_server,$mssql_user,$mssql_pass);
mssql_select_db($CONFIG['dbdbname']) or DIE("Table unavailable");

$result=mssql_query("
select record_time, world_user
from user_count
where auth_user<>0
order by world_user desc");
$max_user=mssql_fetch_assoc($result);


$result=mssql_query("
SELECT AVG(world_user) AS avg_user
FROM user_count
WHERE (server_id = '1') AND (DATEPART(yy, record_time) = '".date("Y")."') AND (DATEPART(mm, record_time) = '".date("m")."') AND (DATEPART(dd, record_time) = '".date("d")."')");
$avg_today=mssql_fetch_assoc($result);
?>




<table border="0" cellpadding="1" cellspacing="1">
<tr>
<td class="al">Cредний Oнлайн: </td>
<td>97</td>
</tr>

<tr>
<td class="al">Мах было :</td>
<td class="t-bold al info ar"><?=$max_user["world_user"]?></td>
</tr>
<tr>
<tr>
<td class="al"><?=$max_user["record_time"]?></td>
<td></td>
</tr>
<tr>
</tr>
</table>
</td>
</tr>
<?=$sep?>
</table>


ненужное удалишь просто (имею ввиду макс. онлайн и тп.)

0
Hoky
Hoky

User

Бывалый

Posts: 167

На форуме с: 03/27/2008

Репутация: +117

Рейтинг: 0

· 05/12/2008, 11:52 AM

Войдите и наберите 2 постов

0
Asmik
Asmik

User

Новичок

Posts: 15

На форуме с: 06/09/2007

Репутация: +45

Рейтинг: 0

· 05/14/2008, 12:03 PM

jeka101: Мне нужен скрипт mssql который!


вот скрипт

Цитата
<tr>
<td class="navbgright"><center>
<span class="t-small">Логин сервер:</span>
<?
error_reporting(0);
if ($fp=fsockopen("127.0.0.1","2106",$ERROR_NO,$ERROR_STR,(float)0.5))
{
echo "Жив";
fclose($fp);
}
else
echo "Сдох";
?> </td>
</tr>

<tr>
<td class="navbgright"><center>

<!--
navigation/navigation_right_link
-->

<!--
navigation/navigation_right_link
-->

<span class="t-small">Гейм Сервер:</span>
<?
error_reporting(0);
if ($fp=fsockopen("127.0.0.1","7777",$ERROR_NO,$ERROR_STR,(float)0.5))
{
echo "Жив";
fclose($fp);
}
else
echo "Сдох";
?> </td>
</tr>

0
Topic is closed for replies