웹마스터 팁

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>";
?>

제목 글쓴이 날짜
홈페이지 관리자 모드 구축하기 (HTTP 인증, 중복 맞음) [10] file 9000㎒ 2003.11.01
카일레라 서버 페이지 만들기. [2] teslaMINT 2003.12.09
페이지에 암호를 걸자..=_= [27] ☺심심 2004.06.25
나만의 미니홈 만들기 ㅡ 기초적인 관리 페이지 [3] file 예뜨락 2004.11.20
나만의 미니홈 만들기 ㅡ 미니홈 생성 페이지 [3] file 예뜨락 2004.11.20
웹페이지 미리보기 snapshot 활용하기 [2] 유창화 2008.02.15
에러페이지를 서버관리자가 지정한 페이지로. [1] teenteenv 2002.02.21
htaccss를 활용하자! 1탄 에러페이지 만들기 [10] [쿨럭]블루엔젤 2003.01.23
APM_Setup4 에서 에러페이지 띄우기 [2] RedEye(kaist) 2003.05.28
[XAMPP]한 컴퓨터에서 여러 개의 홈페이지 운영하는 방법(가상호스트 아님) [8] The Darkness 2004.02.05
홈페이지 대량 변조 발생에 따른 ‘주의’ 경보발령 [4] ATpple.com 2005.01.07
두개 이상의 홈페이지 운영 - Virtual host 설정 [1] 이성헌 2005.12.15
텍스타일 블로그 메인페이지 만들기 [1] designm 2011.01.13
XE에서 레이아웃이나 기타의 페이지에 include 사용에 대한 오해??? [3] DuRi 2011.01.18
홈페이지 브라우저 크기 고정시키기 코아 코스튬 2011.01.30
외부페이지 로그인 연동 [10] 응삼 2011.02.28
페이지 수정시 팝업창 높이 조절... [1] 브레인630 2011.03.07
홈페이지에 퀵메뉴를 다는 소스 (ie7이상, 사파리, 불여우, 오페라 등은 position:fixed 로 고정) [20] Firstlove 2011.03.14
타이틀에 홈페이지 제목 추가 시키기 [5] file 웹 엔진 2011.03.17
"현재 xe코어1.4.4.4버전에서는 익스플로어에서 페이지수정 등의 작업을 할때 에러가 자주 발생하곤 합니다." 유샤인 2011.03.29