|
|
|
07-07-16
|
조회 3,111
|
|
|
|
07-07-06
|
조회 2,995
|
|
|
|
07-07-06
|
조회 3,429
|
|
|
|
07-06-23
|
조회 3,254
|
|
|
|
07-06-16
|
조회 2,765
|
|
|
관리자
|
07-05-20
|
조회 4,263
|
|
|
|
07-05-09
|
조회 3,446
|
|
|
|
07-05-09
|
조회 6,084
|
|
|
|
07-05-04
|
조회 2,683
|
|
|
|
07-04-30
|
조회 9,817
|
|
|
|
07-04-27
|
조회 4,320
|
|
|
|
07-04-26
|
조회 3,435
|
|
|
|
07-04-25
|
조회 5,270
|
|
|
|
07-04-18
|
조회 7,775
|
|
|
|
07-04-13
|
조회 3,107
|
|
|
|
07-04-12
|
조회 6,620
|
|
|
|
07-04-12
|
조회 5,024
|
|
|
|
07-04-12
|
조회 3,333
|
|
|
|
07-04-11
|
조회 5,703
|
|
|
|
07-04-05
|
조회 6,349
|
|
|
|
07-03-24
|
조회 4,407
|
|
|
|
07-03-20
|
조회 3,726
|
|
|
|
07-03-18
|
조회 3,986
|
|
|
|
07-03-18
|
조회 4,731
|
|
|
|
07-03-17
|
조회 4,226
|
|
|
|
07-03-16
|
조회 4,122
|
|
|
|
07-03-15
|
조회 5,283
|
|
|
|
07-03-13
|
조회 5,389
|
|
|
|
07-03-13
|
조회 3,577
|
|
|
|
07-03-08
|
조회 4,485
|
|
|
|
07-03-08
|
조회 3,969
|
|
|
|
07-03-08
|
조회 3,286
|
|
|
|
07-03-08
|
조회 4,173
|
|
|
|
07-03-05
|
조회 4,418
|
|
|
|
07-03-04
|
조회 2,899
|
|
|
|
07-03-01
|
조회 5,935
|
|
|
|
07-02-28
|
조회 3,227
|
|
|
|
07-02-27
|
조회 4,397
|
|
|
|
07-02-26
|
조회 3,309
|
|
|
|
07-02-26
|
조회 3,024
|
|
|
|
07-02-23
|
조회 3,657
|
|
|
|
07-02-23
|
조회 3,625
|
|
|
|
07-02-22
|
조회 4,006
|
|
|
|
07-02-22
|
조회 3,812
|
|
|
|
07-02-19
|
조회 3,843
|
|
|
복스리
|
07-02-17
|
조회 4,862
|
|
|
복스리
|
07-02-14
|
조회 8,158
|
|
|
|
07-02-12
|
조회 3,925
|
|
|
|
07-02-10
|
조회 3,542
|
|
|
|
07-02-02
|
조회 3,789
|
|
|
|
07-01-31
|
조회 3,461
|
|
|
|
07-01-29
|
조회 3,323
|
|
|
|
07-01-25
|
조회 5,109
|
|
|
|
07-01-21
|
조회 3,254
|
|
|
|
07-01-19
|
조회 3,037
|
|
|
복스리
|
06-12-15
|
조회 4,040
|
|
|
|
06-12-15
|
조회 4,456
|
|
|
|
06-12-15
|
조회 2,943
|
|
|
|
06-12-15
|
조회 4,484
|
|
|
|
06-12-15
|
조회 3,380
|
|
|
|
06-12-15
|
조회 4,088
|
|
|
|
06-12-15
|
조회 3,035
|
|
|
|
06-12-15
|
조회 2,761
|
|
|
|
06-12-15
|
조회 4,625
|
|
|
|
06-12-15
|
조회 3,170
|
|
|
|
06-12-15
|
조회 3,270
|
|
|
|
06-12-07
|
조회 4,710
|
|
|
|
06-12-07
|
조회 3,999
|
|
|
|
06-12-04
|
조회 4,649
|
|
|
|
06-11-27
|
조회 3,690
|
|
|
|
06-11-21
|
조회 4,011
|
|
|
|
06-11-15
|
조회 3,438
|
|
|
관리자
|
06-11-04
|
조회 3,323
|
|
|
|
06-10-29
|
조회 3,980
|
|
|
|
06-10-13
|
조회 3,838
|
|
|
|
06-10-13
|
조회 4,209
|
|
|
|
06-10-13
|
조회 4,170
|
|
|
|
06-10-12
|
조회 5,362
|
|
|
|
06-10-12
|
조회 4,270
|
|
|
|
06-10-04
|
조회 3,770
|
|
|
|
06-10-02
|
조회 4,555
|
|
|
|
06-09-29
|
조회 3,043
|
|
|
|
06-09-26
|
조회 3,382
|
|
|
|
06-09-26
|
조회 3,643
|
|
|
|
06-09-26
|
조회 3,291
|
|
|
|
06-09-26
|
조회 3,439
|
|
|
|
06-09-26
|
조회 4,338
|
|
|
|
06-09-25
|
조회 4,646
|
|
|
|
06-09-22
|
조회 4,985
|
|
|
|
06-09-22
|
조회 3,549
|
|
|
|
06-09-21
|
조회 4,321
|
|
|
|
06-09-21
|
조회 4,331
|
|
|
|
06-09-21
|
조회 3,540
|
|
|
|
06-09-21
|
조회 5,188
|
|
|
|
06-09-21
|
조회 3,719
|
|
|
|
06-09-21
|
조회 3,452
|
|
|
|
06-09-20
|
조회 3,021
|
|
|
|
06-09-15
|
조회 3,141
|
|
|
|
06-09-13
|
조회 3,463
|
|
|
|
06-09-11
|
조회 3,278
|
댓글 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 가 나름 다루기 편해서입니다.
네발가락님 짱^^