서버시간을 불러오는 사이트를 만들고있는데요, 소스좀 봐주실 수 있나요? 채택완료
박한
8년 전
조회 2,193
소스코드를 이용하여 작업을 해보고 있는데요(닷홈 무료호스팅이용중)
주소를 입력하고 서버시간 불러오는 속도가 굉장히 느립니다.
더불어 시간이 1970년 무슨 이런식으로 이상하게나오네요
이에관하여 지식을 얻을 수 있을까요?
</p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"><span style="white-space:pre"> </span><?</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">/*</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">해당 서버의 시간 알아오기</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">*/</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">$host=$_GET['host'];</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">$host=ereg_replace("^.*//", "", $host);</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">?></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"><style></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">body, input, td, div</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">{</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> font-family : arial,굴림;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> font-size : 9pt;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">}</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">.button</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">{</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> border-width : 1px;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> border-style : solid;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> border-color : #9F3515;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> background : #FF754B;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> color : #ffffff;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> height : 20px;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> font-weight : bold;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> padding : 2px 1px 0px 1px;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">}</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">.input</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">{</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> border-width : 1px;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> border-style : solid;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> border-color : #777777;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> background : #ffffff;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> color : #000000;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> height : 20px;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> padding : 1px 1px 0px 1px;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">}</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"></style></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"></head></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"><body></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"><table align="center" bgcolor="#FFE241" border="0" cellpadding="15" cellspacing="1" width="100%"></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> <tr></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> <td bgcolor="#FDF7D5"> 시간을 확인할 서버의 도메인(또는 IP address)을 입력하세요. (예:ebs.co.kr)
</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> <form style="display:inline">http://</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> <input class="input" name="host" size="30" type="text" value="<?=$host?>"></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> <input class="button" type="submit" value="확인"></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> </form></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> </td></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> </tr></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"></table></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"><?</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">if($host)</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">{</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $fp=@fsockopen($host, 80, $errno, $errstr, 3);</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> if($fp)</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> {</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $gap=time();</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> fputs($fp, "GET /test_request HTTP/1.0n");</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> fputs($fp,"n");</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $data='';</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> while(! feof ($fp))</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> {</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $data .=fgets ($fp, 1024);</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> }</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> fclose ($fp);</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $data=explode("Date: ", $data);</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $data=explode(" GMT", $data[1]);</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $data=strtotime($data[0]) + 9 * 3600;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $data=(int)$data;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> if(!$data)</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> {</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> echo "
서버 접속에 실패하였습니다.";</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> }</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> else</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> {</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $gap=time() - $gap;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> $data=$data + $gap;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">?></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">
<font style="font-size:20pt"><b><?=$host ?></b>의 현재시간은...
<b><div id="timeArea" style="display:inline; font-size:20pt"></div></b>입니다.</font></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> <script language="javascript"></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> var timePass = 0;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> function showTime()</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> {</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> var now = new Date();</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> var timeStamp = (<?=$data?> + timePass) * 1000;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> now.setTime(timeStamp);</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> var yy = now.getFullYear();</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> var mm = now.getMonth() + 1;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> var dd = now.getDate();</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> var hh = now.getHours();</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> var ii = now.getMinutes();</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> var ss = now.getSeconds();</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> document.getElementById('timeArea').innerHTML = yy + "년 " + mm + "월 " + dd + "일 " + hh + "시 " + ii + "분 " + ss + "초";</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> timePass++;</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> setTimeout("showTime()", 1000);</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> }</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> showTime();</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> </script></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"><?</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> }</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> }</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> else</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> {</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> echo "
서버 접속에 실패하였습니다.";</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"> }</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">}</span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;">?></span></span></p><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; background-color: rgb(255, 255, 255);"><span style="font-family: dotum, sans-serif;"><span style="font-size: 12px;"></body></span></span><span style="font-size: 12px; font-family: dotum, sans-serif;">);</span> </p><div>
</div><p style="box-sizing: border-box; word-break: break-all; line-height: 21.6px; color: rgb(51, 51, 51); font-family: dotum, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
마르스컴퍼니
Expert
8년 전
제가 해당 소스로 테스트했을 때는 정상적으로 나오는 경우도 있습니다.
sir.kr 등
다만, 일부 사이트의 경우에는.. 다른 Response 가 나오거나, Response 를 주지 않는 경우로 인해..
그러한 문제가 발생하는 듯 싶습니다. 이에 대한 다른 방법을 찾아봐야 하지 않을까 합니다.
1970년 등으로 나오는 이유는 timestamp 가 1970년 1월 1일을 기준으로 한 것이라서..
값을 전혀 못받아올 때.. 즉 값이 없을 때.. 그렇게 나올 것입니다.
즉, 값을 가져오는 시간이 오래 걸리는 것은 Response 를 못 받는 것이고,
결국 시각 정보는 받지 못해서.. 1970 년 등으로 나오는 것 같습니다.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
박한
8년 전
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
네이비즘에서 소스를 공개했었다고하는데 찾을수가없네요
쉬운일이아니군요!