|
|
|
17년 전
|
조회 1,688
|
|
|
|
17년 전
|
조회 1,827
|
|
|
|
17년 전
|
조회 2,959
|
|
|
|
17년 전
|
조회 2,104
|
|
|
|
17년 전
|
조회 1,775
|
|
|
|
17년 전
|
조회 2,110
|
|
|
|
17년 전
|
조회 1,825
|
|
|
|
17년 전
|
조회 3,360
|
|
|
|
17년 전
|
조회 1,539
|
|
|
|
17년 전
|
조회 1,668
|
|
|
|
17년 전
|
조회 1,381
|
|
|
|
17년 전
|
조회 2,194
|
|
|
|
17년 전
|
조회 3,141
|
|
|
|
17년 전
|
조회 2,280
|
|
|
|
17년 전
|
조회 1,739
|
|
|
|
17년 전
|
조회 2,992
|
|
|
|
17년 전
|
조회 4,440
|
|
|
|
17년 전
|
조회 1,753
|
|
|
|
17년 전
|
조회 3,250
|
|
|
|
17년 전
|
조회 1,577
|
|
|
|
17년 전
|
조회 3,492
|
|
|
|
17년 전
|
조회 5,847
|
|
|
|
17년 전
|
조회 1,426
|
|
|
|
17년 전
|
조회 2,166
|
|
|
|
17년 전
|
조회 1,797
|
|
|
|
17년 전
|
조회 1,538
|
|
|
|
17년 전
|
조회 2,423
|
|
|
|
17년 전
|
조회 2,635
|
|
|
|
17년 전
|
조회 1,600
|
|
|
|
17년 전
|
조회 2,691
|
|
|
|
17년 전
|
조회 3,178
|
|
|
|
17년 전
|
조회 1,532
|
|
|
|
17년 전
|
조회 1,951
|
|
|
|
17년 전
|
조회 3,852
|
|
|
|
17년 전
|
조회 4,484
|
|
|
|
17년 전
|
조회 1,879
|
|
|
|
17년 전
|
조회 1,740
|
|
|
|
18년 전
|
조회 2,677
|
|
|
|
18년 전
|
조회 1,859
|
|
|
|
18년 전
|
조회 3,943
|
|
|
|
18년 전
|
조회 1,652
|
|
|
|
16년 전
|
조회 1,935
|
|
|
|
18년 전
|
조회 2,266
|
|
|
|
18년 전
|
조회 2,118
|
|
|
|
18년 전
|
조회 3,574
|
|
|
|
18년 전
|
조회 1,589
|
|
|
|
18년 전
|
조회 2,662
|
|
|
|
18년 전
|
조회 1,645
|
|
|
|
18년 전
|
조회 1,916
|
|
|
|
18년 전
|
조회 7,435
|
|
|
|
18년 전
|
조회 2,004
|
|
|
|
18년 전
|
조회 4,097
|
|
|
|
18년 전
|
조회 2,429
|
|
|
|
18년 전
|
조회 2,437
|
|
|
|
18년 전
|
조회 2,160
|
|
|
|
18년 전
|
조회 2,203
|
|
|
|
18년 전
|
조회 2,625
|
|
|
관리자
|
18년 전
|
조회 3,220
|
|
|
관리자
|
18년 전
|
조회 5,332
|
|
|
|
18년 전
|
조회 2,788
|
|
|
|
18년 전
|
조회 2,703
|
|
|
|
18년 전
|
조회 2,556
|
|
|
|
18년 전
|
조회 1,805
|
|
|
|
18년 전
|
조회 2,211
|
|
|
관리자
|
18년 전
|
조회 5,320
|
|
|
|
18년 전
|
조회 3,031
|
|
|
|
18년 전
|
조회 2,594
|
|
|
|
18년 전
|
조회 3,266
|
|
|
|
18년 전
|
조회 2,486
|
|
|
|
18년 전
|
조회 2,841
|
|
|
|
18년 전
|
조회 5,878
|
|
|
|
18년 전
|
조회 2,622
|
|
|
|
18년 전
|
조회 2,020
|
|
|
|
18년 전
|
조회 2,654
|
|
|
|
18년 전
|
조회 1,482
|
|
|
|
18년 전
|
조회 9,806
|
|
|
|
18년 전
|
조회 4,462
|
|
|
관리자
|
18년 전
|
조회 3,294
|
|
|
관리자
|
18년 전
|
조회 1,816
|
|
|
|
18년 전
|
조회 3,608
|
|
|
|
18년 전
|
조회 2,291
|
|
|
|
18년 전
|
조회 3,734
|
|
|
|
18년 전
|
조회 5,184
|
|
|
|
18년 전
|
조회 3,839
|
|
|
|
18년 전
|
조회 2,676
|
|
|
관리자
|
18년 전
|
조회 2,941
|
|
|
|
18년 전
|
조회 2,452
|
|
|
|
18년 전
|
조회 2,792
|
|
|
|
18년 전
|
조회 1,903
|
|
|
관리자
|
18년 전
|
조회 3,444
|
|
|
|
18년 전
|
조회 2,142
|
|
|
|
18년 전
|
조회 2,270
|
|
|
|
18년 전
|
조회 2,089
|
|
|
|
18년 전
|
조회 3,058
|
|
|
|
18년 전
|
조회 2,007
|
|
|
|
18년 전
|
조회 2,672
|
|
|
|
18년 전
|
조회 3,877
|
|
|
|
18년 전
|
조회 4,569
|
|
|
|
18년 전
|
조회 2,379
|
|
|
|
18년 전
|
조회 2,852
|
댓글 7개
근데 저거 금방없어질 예감인데 ㅋㅋ;;
날씨배너 색상별 지역별 75종 kweather 걸루 만들어 봤는데 구경오세요
kweather 은 회원가입도 해야하고 절차가 복잡하니 제 것 가져다 쓰세요
제것은 누르면 음악플레이어도 나옵니다.. 쩝..
http://blog.paran.com/necast/24428191
function make_weather(){
srand((double)microtime()*1000000);
$boundary = "---------------------".substr(md5(rand(0,32000)),0,10);
$header = "POST /XML/weather/sfc_web_map.xml HTTP/1.0\r\n";
$header .= "Host: kma.go.kr\r\n";
$header .= "Content-type: multipart/form-data, boundary=".$boundary."\r\n";
/*
// 본문 생성
foreach($sms AS $index => $value){
$data .="--$boundary\r\n";
$data .= "Content-Disposition: form-data; name=\"".$index."\"\r\n";
$data .= "\r\n".$value."\r\n";
$data .="--$boundary\r\n";
}
*/
$header .= "Content-length: " . strlen($data) . "\r\n\r\n";
$fp = fsockopen('kma.go.kr', 80);
if ($fp) {
fputs($fp, $header.$data);
$rsp = '';
while(!feof($fp)) {
$rsp .= fgets($fp,8192);
}
fclose($fp);
$msg = explode("\r\n\r\n",trim($rsp));
$rMsg = explode(",", $msg[1]);
}
$xmldoc = new DOMDocument();
$xmldoc->loadXML($msg[1]);
$local_dom_result = $xmldoc->getElementsByTagName('local');
$result = array();
foreach($local_dom_result as $subkey){
$ta = $subkey->getAttribute('ta');
$icon = $subkey->getAttribute('icon');
$name = iconv("UTF-8", "euckr",$subkey->nodeValue);
$result[$name]=array('icon'=>$icon, 'ta'=>$ta);
}
return $result;
}
// 결과 값은.
array(
array('속초'=>array('icon'=>'01', 'ta'=>'20.93'),
array('서울'=>array('icon'=>'02', 'ta'=>'24.93'),
);
형태 입니다.
디자이너가 어디서 날씨 스크롤 플래쉬소스를 떡하니 붙여 놔서 할수 없이 작업해야 했습니다.
icon을 넣는 이유는 아이콘도 기상청에서 제공하는 날씨 아이콘 숫자처럼 01.gif, 02.gif 로 있더군
요. 정확하게 매치되네요.
euc-kr 용이며, utf-8에서는 그냥 iconv 만 빼면 됩니다.
php.5.1 이상에서 작동하며, 이유는 simplexml 보다는 domdocument 가 나름 다루기 편해서입니다.
function make_weather(){
srand((double)microtime()*1000000);
$boundary = "---------------------".substr(md5(rand(0,32000)),0,10);
$header = "POST /XML/weather/sfc_web_map.xml HTTP/1.0\r\n";
$header .= "Host: kma.go.kr\r\n";
$header .= "Content-type: multipart/form-data, boundary=".$boundary."\r\n";
/*
// 본문 생성
foreach($sms AS $index => $value){
$data .="--$boundary\r\n";
$data .= "Content-Disposition: form-data; name=\"".$index."\"\r\n";
$data .= "\r\n".$value."\r\n";
$data .="--$boundary\r\n";
}
*/
$header .= "Content-length: " . strlen($data) . "\r\n\r\n";
$fp = fsockopen('kma.go.kr', 80);
if ($fp) {
fputs($fp, $header.$data);
$rsp = '';
while(!feof($fp)) {
$rsp .= fgets($fp,8192);
}
fclose($fp);
$msg = explode("\r\n\r\n",trim($rsp));
$rMsg = explode(",", $msg[1]);
}
$xmldoc = new DOMDocument();
$xmldoc->loadXML($msg[1]);
$local_dom_result = $xmldoc->getElementsByTagName('local');
$result = array();
foreach($local_dom_result as $subkey){
$ta = $subkey->getAttribute('ta');
$icon = $subkey->getAttribute('icon');
$name = iconv("UTF-8", "euckr",$subkey->nodeValue);
$result[$name]=array('icon'=>$icon, 'ta'=>$ta);
}
return $result;
}
// 결과 값은.
array(
array('속초'=>array('icon'=>'01', 'ta'=>'20.93'),
array('서울'=>array('icon'=>'02', 'ta'=>'24.93'),
);
형태 입니다.
디자이너가 어디서 날씨 스크롤 플래쉬소스를 떡하니 붙여 놔서 할수 없이 작업해야 했습니다.
icon을 넣는 이유는 아이콘도 기상청에서 제공하는 날씨 아이콘 숫자처럼 01.gif, 02.gif 로 있더군
요. 정확하게 매치되네요.
euc-kr 용이며, utf-8에서는 그냥 iconv 만 빼면 됩니다.
php.5.1 이상에서 작동하며, 이유는 simplexml 보다는 domdocument 가 나름 다루기 편해서입니다.
네발가락님 짱^^