웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
카일레라 서버 페이지 만들기.
2003.12.09 18:24
http://www.kaillera.com에뮬 멀티할때 접속하는 카일레라 서버의 상태 페이지를 만들어 봅시다. 'w'
카일레라 서버는 링크1에 있습니다.
--------------------------------------------------------------------
<pre>
<?php
$_ip="192.168.0.1:27888"; // 자신의 ip와 포트 번호로 수정합니다.
$file=@file("http://".$_ip."/?page=status");
if($file) {
echo "서버 상태(status): <font color=blue>가동중.(online)</font>nn";
$uptime=$file[3]; $uptime=str_replace("uptime:","",$uptime);
$uptime=str_replace("seconds","",$uptime); $uptime=trim($uptime);
$stamp=explode(".",$uptime);
$days=(int)($stamp[0]/86400);
$stamp[0]-=$days*86400;
$hrs=(int)($stamp[0]/3600);
$stamp[0]-=$hrs*3600;
$mins=(int)($stamp[0]/60);
$stamp[0]-=$mins*60;
$secs=(int)($stamp[0]);
echo "가동 시간(uptime): ".$days." days ".$hrs." hours ".$mins." min ".$secs." secs ".$stamp[1]." microsecs.n";
$clients=$file[5]; $clients=trim(str_replace("# clients:","",$clients));
echo "접속자(clients): ".$clients." 명n";
$games=$file[6]; $games=trim(str_replace("# games:","",$games));
echo "개설된 게임(games): ".$games." 개n";
echo"</pre>n<table border=1 bordercolor=black cellpadding=3 cellspacing=0>n";
echo"<caption><font size=3 face="Tahoma"><b>Client List</b></font></caption>n";
echo"<tr><th>No</th><th>Name</th><th>Client</th><th>Connection</th><th>Status</th></tr>n";
for($i=10;$i<$clients+10;$i++) {
$j++;
$temp=explode("t",$file[$i]);
echo"<tr><td> ".$j." </td><td> ".$temp[0]." </td><td> ".$temp[1]." </td><td> ".$temp[2]." </td><td> ".$temp[3]." </td></tr>n";
} $j=0;
echo"</table>n<table border=1 bordercolor=black cellpadding=3 cellspacing=0>n";
echo"<caption><font size=3 face="Tahoma"><b>Games List</b></font></caption>n";
echo"<tr><th>No</th><th>Title</th><th>Users</th><th>Status</th></tr>n";
for($i=$clients+13;$i<$clients+13+$games;$i++) {
$j++;
$temp=explode("t",$file[$i]);
echo"<tr><td>".$j."</td><td>".$temp[0]."</td><td>".$temp[1]."</td><td>".$temp[2]."</td></tr>n";
}
echo"</table>";
} else echo"서버 상태(status): <font color=red>정지.(offline)</font>n</pre>";
?>
카일레라 서버는 링크1에 있습니다.
--------------------------------------------------------------------
<pre>
<?php
$_ip="192.168.0.1:27888"; // 자신의 ip와 포트 번호로 수정합니다.
$file=@file("http://".$_ip."/?page=status");
if($file) {
echo "서버 상태(status): <font color=blue>가동중.(online)</font>nn";
$uptime=$file[3]; $uptime=str_replace("uptime:","",$uptime);
$uptime=str_replace("seconds","",$uptime); $uptime=trim($uptime);
$stamp=explode(".",$uptime);
$days=(int)($stamp[0]/86400);
$stamp[0]-=$days*86400;
$hrs=(int)($stamp[0]/3600);
$stamp[0]-=$hrs*3600;
$mins=(int)($stamp[0]/60);
$stamp[0]-=$mins*60;
$secs=(int)($stamp[0]);
echo "가동 시간(uptime): ".$days." days ".$hrs." hours ".$mins." min ".$secs." secs ".$stamp[1]." microsecs.n";
$clients=$file[5]; $clients=trim(str_replace("# clients:","",$clients));
echo "접속자(clients): ".$clients." 명n";
$games=$file[6]; $games=trim(str_replace("# games:","",$games));
echo "개설된 게임(games): ".$games." 개n";
echo"</pre>n<table border=1 bordercolor=black cellpadding=3 cellspacing=0>n";
echo"<caption><font size=3 face="Tahoma"><b>Client List</b></font></caption>n";
echo"<tr><th>No</th><th>Name</th><th>Client</th><th>Connection</th><th>Status</th></tr>n";
for($i=10;$i<$clients+10;$i++) {
$j++;
$temp=explode("t",$file[$i]);
echo"<tr><td> ".$j." </td><td> ".$temp[0]." </td><td> ".$temp[1]." </td><td> ".$temp[2]." </td><td> ".$temp[3]." </td></tr>n";
} $j=0;
echo"</table>n<table border=1 bordercolor=black cellpadding=3 cellspacing=0>n";
echo"<caption><font size=3 face="Tahoma"><b>Games List</b></font></caption>n";
echo"<tr><th>No</th><th>Title</th><th>Users</th><th>Status</th></tr>n";
for($i=$clients+13;$i<$clients+13+$games;$i++) {
$j++;
$temp=explode("t",$file[$i]);
echo"<tr><td>".$j."</td><td>".$temp[0]."</td><td>".$temp[1]."</td><td>".$temp[2]."</td></tr>n";
}
echo"</table>";
} else echo"서버 상태(status): <font color=red>정지.(offline)</font>n</pre>";
?>
제목 | 글쓴이 | 날짜 |
---|---|---|
XE에서 레이아웃이나 기타의 페이지에 include 사용에 대한 오해??? [3] | DuRi | 2011.01.18 |
텍스타일 블로그 메인페이지 만들기 [1] | designm | 2011.01.13 |
두개 이상의 홈페이지 운영 - Virtual host 설정 [1] | 이성헌 | 2005.12.15 |
홈페이지 대량 변조 발생에 따른 ‘주의’ 경보발령 [4] | ATpple.com | 2005.01.07 |
[XAMPP]한 컴퓨터에서 여러 개의 홈페이지 운영하는 방법(가상호스트 아님) [8] | The Darkness | 2004.02.05 |
APM_Setup4 에서 에러페이지 띄우기 [2] | RedEye(kaist) | 2003.05.28 |
htaccss를 활용하자! 1탄 에러페이지 만들기 [10] | [쿨럭]블루엔젤 | 2003.01.23 |
에러페이지를 서버관리자가 지정한 페이지로. [1] | teenteenv | 2002.02.21 |
웹페이지 미리보기 snapshot 활용하기 [2] | 유창화 | 2008.02.15 |
나만의 미니홈 만들기 ㅡ 미니홈 생성 페이지 [3] | 예뜨락 | 2004.11.20 |
나만의 미니홈 만들기 ㅡ 기초적인 관리 페이지 [3] | 예뜨락 | 2004.11.20 |
페이지에 암호를 걸자..=_= [27] | ☺심심 | 2004.06.25 |
카일레라 서버 페이지 만들기. [2] | teslaMINT | 2003.12.09 |
홈페이지 관리자 모드 구축하기 (HTTP 인증, 중복 맞음) [10] | 9000㎒ | 2003.11.01 |
내 홈페이지의 방문자 어디서 접속했을까 알아봅시다 [21] | 버찌소년 | 2003.10.08 |
홈페이지의 내용을 DB에 담기 [15] | 세죠위그이 | 2003.05.30 |
제로보드식 에러페이지 만들기 [2] | .zeve | 2003.02.04 |
[동주아빠] PHP 게시판(17강) - 저장 후 페이지 이동 | 손병목 | 2002.12.25 |
모닝샵 이용해서 쇼핑몰 만들기 (웹페이지 만들기1) [8] | 한꼬마 | 2002.11.22 |
초보의 초보를위한 강의 PHP를 활용한 페이지 암호걸기 #3 [10] | 아이쿠 | 2002.11.15 |
php 기본도 모르는지라 이런팁이 매우 소중한... 하드안에 소중히 모셔놔야겠네여 ^^ 감사