|
|
|
08-04-17
|
조회 4,321
|
|
|
|
08-03-14
|
조회 3,206
|
|
|
|
08-03-08
|
조회 3,027
|
|
|
|
08-03-06
|
조회 2,998
|
|
|
|
08-03-03
|
조회 4,289
|
|
|
|
08-02-20
|
조회 2,977
|
|
|
|
08-02-15
|
조회 3,890
|
|
|
|
08-02-11
|
조회 5,048
|
|
|
|
08-02-09
|
조회 5,780
|
|
|
|
08-02-05
|
조회 3,819
|
|
|
관리자
|
08-01-14
|
조회 6,629
|
|
|
|
08-01-11
|
조회 7,063
|
|
|
|
08-01-04
|
조회 1.1만
|
|
|
|
07-12-10
|
조회 4,969
|
|
|
|
07-12-10
|
조회 3,834
|
|
|
|
07-12-04
|
조회 3,375
|
|
|
|
07-11-29
|
조회 3,548
|
|
|
|
07-11-27
|
조회 3,904
|
|
|
|
07-11-23
|
조회 4,505
|
|
|
관리자
|
07-11-23
|
조회 4,235
|
|
|
|
07-11-13
|
조회 4,362
|
|
|
|
07-10-19
|
조회 4,824
|
|
|
|
07-10-17
|
조회 5,877
|
|
|
|
07-10-03
|
조회 4,981
|
|
|
|
07-10-02
|
조회 8,799
|
|
|
|
07-10-02
|
조회 4,458
|
|
|
|
07-09-09
|
조회 3,427
|
|
|
|
07-07-29
|
조회 4,310
|
|
|
|
07-07-28
|
조회 4,536
|
|
|
|
07-07-26
|
조회 4,443
|
|
|
|
07-06-19
|
조회 1.1만
|
|
|
|
07-06-17
|
조회 3,608
|
|
|
|
07-06-15
|
조회 4,105
|
|
|
|
07-05-31
|
조회 3,164
|
|
|
|
07-05-09
|
조회 5,318
|
|
|
|
07-05-04
|
조회 3,164
|
|
|
|
07-05-04
|
조회 3,512
|
|
|
|
07-04-28
|
조회 6,408
|
|
|
|
07-04-26
|
조회 4,656
|
|
|
|
07-04-14
|
조회 5,302
|
|
|
|
07-04-13
|
조회 3,716
|
|
|
|
07-04-12
|
조회 5,909
|
|
|
|
07-03-27
|
조회 3,849
|
|
|
|
07-03-19
|
조회 3,553
|
|
|
|
07-03-13
|
조회 4,622
|
|
|
|
07-03-07
|
조회 4,771
|
|
|
|
07-03-07
|
조회 3,283
|
|
|
|
07-02-25
|
조회 3,640
|
|
|
|
07-02-21
|
조회 4,533
|
|
|
|
07-02-18
|
조회 5,050
|
|
|
|
07-02-12
|
조회 3,397
|
|
|
|
07-02-02
|
조회 4,511
|
|
|
|
07-01-28
|
조회 6,123
|
|
|
|
07-01-27
|
조회 5,631
|
|
|
|
07-01-25
|
조회 3,996
|
|
|
|
07-01-21
|
조회 4,631
|
|
|
|
07-01-19
|
조회 6,573
|
|
|
|
07-01-19
|
조회 8,031
|
|
|
|
07-01-13
|
조회 3,490
|
|
|
|
07-01-09
|
조회 5,127
|
|
|
|
06-12-27
|
조회 3,531
|
|
|
|
06-11-24
|
조회 3,651
|
|
|
|
06-11-18
|
조회 4,168
|
|
|
|
06-10-17
|
조회 5,488
|
|
|
|
06-10-01
|
조회 4,411
|
|
|
|
06-09-26
|
조회 4,294
|
|
|
|
06-09-25
|
조회 4,610
|
|
|
|
06-09-25
|
조회 4,325
|
|
|
|
06-09-22
|
조회 4,853
|
|
|
|
06-09-22
|
조회 3,626
|
|
|
|
06-09-22
|
조회 4,456
|
|
|
|
06-09-13
|
조회 5,287
|
|
|
|
06-08-27
|
조회 4,887
|
|
|
|
06-08-26
|
조회 6,266
|
|
|
|
06-08-26
|
조회 5,570
|
|
|
|
06-08-23
|
조회 5,066
|
|
|
|
06-07-28
|
조회 7,167
|
|
|
|
06-07-24
|
조회 4,624
|
|
|
|
06-07-23
|
조회 5,409
|
|
|
|
06-07-21
|
조회 5,168
|
|
|
|
06-07-19
|
조회 3,049
|
|
|
|
06-07-19
|
조회 2,962
|
|
|
|
06-07-11
|
조회 3,622
|
|
|
헌이
|
06-07-11
|
조회 3,912
|
|
|
|
06-07-11
|
조회 4,486
|
|
|
|
06-07-11
|
조회 4,946
|
|
|
|
06-07-11
|
조회 3,570
|
|
|
|
06-07-11
|
조회 9,193
|
|
|
|
06-07-11
|
조회 4,054
|
|
|
|
06-07-11
|
조회 3,285
|
|
|
|
06-07-11
|
조회 3,332
|
|
|
|
06-07-11
|
조회 3,264
|
|
|
|
06-07-11
|
조회 3,068
|
|
|
|
06-07-07
|
조회 4,107
|
|
|
|
06-06-25
|
조회 4,457
|
|
|
|
06-06-15
|
조회 4,452
|
|
|
|
06-06-14
|
조회 4,941
|
|
|
|
06-06-11
|
조회 3,525
|
|
|
|
06-06-10
|
조회 3,906
|
|
|
|
06-06-09
|
조회 3,491
|
댓글 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 가 나름 다루기 편해서입니다.
네발가락님 짱^^