티스토리 뷰

여러 개의 홈페이지를 일정 간격으로 모니터링하기 위한 소스코드입니다.


주소창은 피싱 사이트와 같은 문제로 웹 표준 보안상 사라지지 않아 소스코드(location=no 옵션)에 넣지 않았습니다.

간혹 0.html 에 사이트 주소를 입력했는데도 화면에 안 보이는 경우가 있습니다.

그럴 경우 순서를 바꿔주면 가능할 겁니다. 서버에서 설정한 값 때문에 안 보이는 경우가 발생하는 듯싶습니다.


 [start.html]

<html>

<script type="text/javascript">

 function open_win(){

 window.open("open.html","popup","windth=500, height=600, left=0, top=0, toolbar=no, directories=no, status=no, menubar=no, resizable=no, scrollbars=no, copyhistory=no");

 }

 window.open('','_parent').close();

</script>

<body onLoad="javascript:open_win();">

</body>

</html>


 [open.html]

<html>

<frameset rows="0%,*">

<frame src="0.html" name="top">

<frame src="" name="body">

</frameset>

</html>


 [0.html]

<html>

<head>

<meta http-equiv="refresh" content="10; url=1.html">

</head>

<body>

<script language="javascript">

parent.body.location.href="http://www.daum.net";

</script>

</body>

</html>


 [1.html]

<html>

<head>

<meta http-equiv="refresh" content="10; url=2.html">

</head>

<body>

<script language="javascript">

parent.body.location.href="http://www.tistory.com";

</script>

</body>

</html>


 [2.html]

<html>

<head>

<meta http-equiv="refresh" content="10; url=0.html">

</head>

</html>


추가로 작업 스케줄러에 배치파일을 등록해서 자동으로 재시작하게 할 수도 있습니다.

배치파일과 모니터링소스파일은 같은 디렉토리에 있어야 합니다.


 [start.bat]

@echo off

taskkill /F /IM iexplore.exe

start iexplore.exe D:\monitoring\start.html

exit


댓글
공지사항