|
|
|
08-02-03
|
조회 2,750
|
|
|
|
09-10-03
|
조회 3,077
|
|
|
|
08-02-03
|
조회 3,362
|
|
|
|
08-02-03
|
조회 3,295
|
|
|
|
08-01-30
|
조회 4,794
|
|
|
|
08-01-29
|
조회 2,690
|
|
|
|
08-01-27
|
조회 3,810
|
|
|
|
08-01-27
|
조회 2,765
|
|
|
|
08-01-27
|
조회 3,052
|
|
|
|
08-01-26
|
조회 8,569
|
|
|
|
08-01-26
|
조회 3,168
|
|
|
|
08-01-24
|
조회 5,226
|
|
|
|
08-01-23
|
조회 3,566
|
|
|
|
08-01-21
|
조회 3,602
|
|
|
|
08-01-21
|
조회 3,337
|
|
|
|
08-01-21
|
조회 3,323
|
|
|
|
08-01-18
|
조회 3,838
|
|
|
관리자
|
08-01-18
|
조회 4,469
|
|
|
관리자
|
08-01-18
|
조회 6,623
|
|
|
|
08-01-18
|
조회 3,931
|
|
|
|
08-01-17
|
조회 3,919
|
|
|
|
08-01-17
|
조회 3,737
|
|
|
|
08-01-16
|
조회 2,986
|
|
|
|
08-01-15
|
조회 3,384
|
|
|
관리자
|
08-01-14
|
조회 6,633
|
|
|
|
08-01-12
|
조회 4,226
|
|
|
|
08-01-12
|
조회 3,803
|
|
|
|
08-01-12
|
조회 4,515
|
|
|
|
08-01-12
|
조회 3,741
|
|
|
|
08-01-12
|
조회 4,030
|
|
|
|
08-01-11
|
조회 7,067
|
|
|
|
08-01-10
|
조회 3,809
|
|
|
|
08-01-08
|
조회 3,352
|
|
|
|
08-01-08
|
조회 3,772
|
|
|
|
08-01-06
|
조회 2,587
|
|
|
|
08-01-04
|
조회 1.1만
|
|
|
|
08-01-02
|
조회 5,678
|
|
|
관리자
|
07-12-28
|
조회 4,620
|
|
|
관리자
|
07-12-24
|
조회 3,016
|
|
|
|
07-12-21
|
조회 4,711
|
|
|
|
07-12-17
|
조회 3,506
|
|
|
|
07-12-14
|
조회 4,866
|
|
|
|
07-12-13
|
조회 6,311
|
|
|
|
07-12-10
|
조회 4,972
|
|
|
|
07-12-10
|
조회 3,838
|
|
|
관리자
|
07-12-10
|
조회 4,168
|
|
|
|
07-12-08
|
조회 3,604
|
|
|
|
07-12-07
|
조회 3,952
|
|
|
|
07-12-07
|
조회 3,070
|
|
|
관리자
|
07-12-06
|
조회 4,812
|
|
|
|
07-12-04
|
조회 3,378
|
|
|
|
07-12-04
|
조회 3,495
|
|
|
|
07-12-03
|
조회 3,256
|
|
|
|
07-12-03
|
조회 4,298
|
|
|
|
07-12-02
|
조회 3,115
|
|
|
|
07-11-30
|
조회 3,877
|
|
|
|
07-11-30
|
조회 5,105
|
|
|
|
07-11-30
|
조회 5,717
|
|
|
|
07-11-29
|
조회 3,554
|
|
|
|
07-11-27
|
조회 4,008
|
|
|
|
07-11-27
|
조회 5,792
|
|
|
|
07-11-27
|
조회 3,910
|
|
|
|
07-11-26
|
조회 3,003
|
|
|
|
07-11-23
|
조회 4,506
|
|
|
관리자
|
07-11-23
|
조회 4,239
|
|
|
|
07-11-22
|
조회 5,119
|
|
|
관리자
|
07-11-21
|
조회 3,329
|
|
|
관리자
|
07-11-21
|
조회 3,480
|
|
|
관리자
|
07-11-21
|
조회 1.1만
|
|
|
관리자
|
07-11-20
|
조회 4,869
|
|
|
관리자
|
07-11-16
|
조회 4,708
|
|
|
|
07-11-13
|
조회 4,365
|
|
|
|
07-11-12
|
조회 4,075
|
|
|
|
07-11-10
|
조회 5,448
|
|
|
|
07-11-08
|
조회 6,635
|
|
|
|
07-11-08
|
조회 4,928
|
|
|
|
07-11-07
|
조회 4,387
|
|
|
|
07-11-07
|
조회 4,842
|
|
|
|
07-11-06
|
조회 3,414
|
|
|
|
07-11-06
|
조회 3,795
|
|
|
|
07-11-05
|
조회 5,135
|
|
|
|
07-11-02
|
조회 4,014
|
|
|
|
07-11-01
|
조회 5,477
|
|
|
|
07-10-31
|
조회 3,176
|
|
|
|
07-10-30
|
조회 3,624
|
|
|
|
07-10-29
|
조회 3,587
|
|
|
|
07-10-26
|
조회 4,947
|
|
|
|
07-10-25
|
조회 5,001
|
|
|
|
07-10-25
|
조회 3,820
|
|
|
|
07-10-24
|
조회 3,796
|
|
|
|
07-10-24
|
조회 4,103
|
|
|
|
07-10-24
|
조회 3,990
|
|
|
|
07-10-24
|
조회 3,268
|
|
|
|
07-10-24
|
조회 3,374
|
|
|
|
07-10-23
|
조회 5,990
|
|
|
|
07-10-23
|
조회 5,370
|
|
|
|
07-10-22
|
조회 4,125
|
|
|
|
07-10-22
|
조회 3,505
|
|
|
|
07-10-22
|
조회 4,045
|
|
|
|
07-10-22
|
조회 3,649
|
댓글 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 가 나름 다루기 편해서입니다.
네발가락님 짱^^