웹마스터 팁

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

제목 글쓴이 날짜
404 페이지 못찾음으로 나오는 문제 수정 [9] 화니군 2007.08.18
페이지 수정시 메뉴들 가지런히 놓이게 하기 [3] 팔공산 2007.08.21
홈페이지 주소 고정시키기 [12] file :에반: 2007.08.21
w3c.org의 웹페이지 유효성 검사기 file 바람처럼831 2007.08.24
홈페이지에 게시판을 iframe, include로 이용하시는분들 느까끼 2007.08.27
페이지수정 안되시는 분들께 드리는 팁 [2] 다케루 2007.08.30
메인 페이지 링크 www. 주소 표시, 로그인 링크 문제.... [5] 마덴나 2007.09.08
페이지에 설문 조사 넣기 [2] 지허 2007.10.01
홈페이지 주소 깔끔하게 사용하기 [초보용] [14] 똑디 2007.10.13
관리자 페이지 모듈->댓글 내용에   & " < > 안 나오게 하기 [1] 必得力 2007.10.18
간편해진 페이지 수정법 file coll 2007.11.16
배경이미지기능으로 페이지꾸미기 [3] file 팔공산 2007.11.23
윈도우 라이브 메신저를 홈페이지 서명난에 달자 [1] file Diver 2007.11.26
(회원정보) 보기 페이지에서 포인트 변경하기 [4] file Simulz 2007.11.28
[동영상 강좌2] zbxe 페이지 생성과 기능 설명 [45] file 필반 2007.12.03
외부페이지에서 매개변수 사용가능하도록 하는 방법 [12] 라르게덴 2007.12.05
권한없는 모듈을 만났을때 로그인 페이지 띄우기.. [10] 똑디 2007.12.11
외부페이지 사용법 [8] 길치객 2007.12.11
외부페이지에서 위젯사용하지 않고 로그인 정보 다루기. [5] [1] 길치객 2007.12.12
페이지가 갑자기 하얀화면으로 나올경우에는 이렇게 해보십시오. [9] file 하나로45 2007.12.13