메뉴 건너뛰기

tnt_etc

정보추출 기상청 GOES-9 위성사진

박상현 2004.06.13 11:41 조회 수 : 1388 추천:27

http://krtop.com/php/test1/picview/picview.php기상청 GOES-9 위성사진

<?php

## 기상청 GOES-9 위성사진
##
function kma_img($where,$type) {

        $latest_utime = time() - 3600*10;
        for ($i=0; $i<24; $i++) {
                $this_utime = $latest_utime - 3600*$i;
                $this_date = date("YmdH",$this_utime);
                $img[$i] = "http://kma.go.kr/kma_sat/DATA/".$where.$type.$this_date."00.gif";
        }

        return $img;

}

$where = $_GET['where'];
if (!$where) $where = "GPR/wr";
$type = $_GET['type'];
if (!$type) $type = "i";

$img = kma_img($where,$type);

?>

<html>
<head>
<title>::: 위성사진 동영상 by 0172 (자료출처:기상청) :::</title>

<script type="text/javascript">
<!-- Original: Mike McGrath (mike_mcgrath@lineone.net) -->
<!-- Web Site: http://website.lineone.net/~mike_mcgrath -->

var img=new Array();
img[0]=new Image(); img[0].src="<?=$img[23]?>";
img[1]=new Image(); img[1].src="<?=$img[22]?>";
img[2]=new Image(); img[2].src="<?=$img[21]?>";
img[3]=new Image(); img[3].src="<?=$img[20]?>";
img[4]=new Image(); img[4].src="<?=$img[19]?>";
img[5]=new Image(); img[5].src="<?=$img[18]?>";
img[6]=new Image(); img[6].src="<?=$img[17]?>";
img[7]=new Image(); img[7].src="<?=$img[16]?>";
img[8]=new Image(); img[8].src="<?=$img[15]?>";
img[9]=new Image(); img[9].src="<?=$img[14]?>";
img[10]=new Image(); img[10].src="<?=$img[13]?>";
img[11]=new Image(); img[11].src="<?=$img[12]?>";
img[12]=new Image(); img[12].src="<?=$img[11]?>";
img[13]=new Image(); img[13].src="<?=$img[10]?>";
img[14]=new Image(); img[14].src="<?=$img[9]?>";
img[15]=new Image(); img[15].src="<?=$img[8]?>";
img[16]=new Image(); img[16].src="<?=$img[7]?>";
img[17]=new Image(); img[17].src="<?=$img[6]?>";
img[18]=new Image(); img[18].src="<?=$img[5]?>";
img[19]=new Image(); img[19].src="<?=$img[4]?>";
img[20]=new Image(); img[20].src="<?=$img[3]?>";
img[21]=new Image(); img[21].src="<?=$img[2]?>";
img[22]=new Image(); img[22].src="<?=$img[1]?>";
img[23]=new Image(); img[23].src="<?=$img[0]?>";

var interval=500;        // 이 부분에서 속도 조절
var n=0;
var imgs = new Array(
        "<?=$img[23]?>","<?=$img[22]?>","<?=$img[21]?>","<?=$img[20]?>",
        "<?=$img[19]?>","<?=$img[18]?>","<?=$img[17]?>","<?=$img[16]?>",
        "<?=$img[15]?>","<?=$img[14]?>","<?=$img[13]?>","<?=$img[12]?>",
        "<?=$img[11]?>","<?=$img[10]?>","<?=$img[9]?>","<?=$img[8]?>",
        "<?=$img[7]?>","<?=$img[6]?>","<?=$img[5]?>","<?=$img[4]?>",
        "<?=$img[3]?>","<?=$img[2]?>","<?=$img[1]?>","<?=$img[0]?>"
        );

function rotate() {

        if(navigator.appName=="Netscape" && document.getElementById) {
                document.getElementById("slide").src=imgs[n];
        } else document.images.slide.src=imgs[n];
        (n==(imgs.length-1))?n=0:n++;
        setTimeout("rotate()",interval);

}

</script>

<meta http-equiv="content-type" content="text/html; charset=euc-kr">
</head>

<body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0 bgcolor=black align=center valign=middle onload="rotate()">

<form name=SEL method=GET action="<?=$_SERVER['PHP_SELF']?>">
<table width=100%>
<tr>
        <td align=center valign=middle>
                <select name="where" size="1">
                        <option value="GPR/wr">아시아영역</option>
                        <option value="GPL/wl">한반도영역</option>
                        <option value="GSF/ws">전구영역</option>
                </select>
                <select name="type" size="1">
                        <option value="i">적외선연상</option>
                        <option value="w">수증기영상</option>
                        <option value="v">가시영상</option>
                        <option value="d">합성영상</option>
                </select>
                <input type="submit" value="동영상보기">
        </td>
</tr>
</table>
<table width=100% cellspacing=0 cellpadding=0>
<tr>
        <td width=100% align=center valign=middle><img src="<?=$img[23]?>" id="slide" width=512 height=512></td>
</tr>
</table>
</form>

</body>

</html>


위로