|
|
|
10-09-25
|
조회 2,713
|
|
|
|
10-09-19
|
조회 2,749
|
|
|
|
10-09-15
|
조회 2,751
|
|
|
|
10-09-15
|
조회 4,155
|
|
|
|
10-09-15
|
조회 3,372
|
|
|
|
10-09-15
|
조회 2,487
|
|
|
|
10-09-07
|
조회 3,597
|
|
|
|
10-08-27
|
조회 4,059
|
|
|
|
10-06-11
|
조회 4,217
|
|
|
|
10-05-31
|
조회 2,466
|
|
|
|
10-02-27
|
조회 4,996
|
|
|
|
10-02-09
|
조회 3,747
|
|
|
|
09-10-10
|
조회 7,336
|
|
|
|
09-03-19
|
조회 3,180
|
|
|
|
09-02-09
|
조회 3,460
|
|
|
|
09-02-09
|
조회 4,529
|
|
|
|
08-11-01
|
조회 2,906
|
|
|
|
08-09-29
|
조회 4,559
|
|
|
관리자
|
08-09-26
|
조회 3,511
|
|
|
관리자
|
08-09-26
|
조회 3,589
|
|
|
관리자
|
08-09-26
|
조회 2,724
|
|
|
관리자
|
08-09-26
|
조회 3,768
|
|
|
관리자
|
08-09-26
|
조회 3,492
|
|
|
관리자
|
08-09-26
|
조회 4,253
|
|
|
|
08-09-18
|
조회 3,567
|
|
|
|
08-09-09
|
조회 3,223
|
|
|
|
08-08-28
|
조회 2,762
|
|
|
너굴군
|
08-07-06
|
조회 3,538
|
|
|
|
08-05-21
|
조회 4,694
|
|
|
관리자
|
08-05-13
|
조회 4,534
|
|
|
|
08-04-17
|
조회 4,907
|
|
|
|
08-02-19
|
조회 3,534
|
|
|
|
08-01-18
|
조회 3,841
|
|
|
|
08-01-10
|
조회 3,811
|
|
|
|
07-10-22
|
조회 3,652
|
|
|
|
07-10-09
|
조회 4,302
|
|
|
|
07-10-03
|
조회 3,507
|
|
|
|
07-07-06
|
조회 4,210
|
|
|
|
07-07-06
|
조회 4,425
|
|
|
|
07-07-06
|
조회 4,035
|
|
|
|
07-06-28
|
조회 3,563
|
|
|
|
07-06-05
|
조회 3,564
|
|
|
|
07-06-05
|
조회 4,112
|
|
|
관리자
|
07-05-30
|
조회 3,279
|
|
|
|
07-05-02
|
조회 3,684
|
|
|
|
07-04-15
|
조회 5,138
|
|
|
|
07-04-11
|
조회 3,625
|
|
|
관리자
|
07-04-05
|
조회 3,925
|
|
|
|
07-03-31
|
조회 3,148
|
|
|
|
07-03-31
|
조회 4,122
|
|
|
|
07-03-30
|
조회 3,728
|
|
|
|
07-03-24
|
조회 4,000
|
|
|
|
07-03-22
|
조회 3,655
|
|
|
|
07-03-12
|
조회 4,405
|
|
|
|
07-02-16
|
조회 3,267
|
|
|
|
07-02-14
|
조회 5,164
|
|
|
|
07-02-10
|
조회 3,990
|
|
|
|
07-02-09
|
조회 4,376
|
|
|
|
07-01-19
|
조회 4,041
|
|
|
관리자
|
07-01-16
|
조회 4,968
|
|
|
|
06-12-16
|
조회 5,833
|
|
|
|
06-11-30
|
조회 3,596
|
|
|
|
06-11-25
|
조회 3,696
|
|
|
|
06-10-15
|
조회 5,064
|
|
|
|
06-09-26
|
조회 5,307
|
|
|
|
06-09-26
|
조회 5,423
|
|
|
|
06-09-22
|
조회 4,261
|
|
|
|
06-09-21
|
조회 3,541
|
|
|
|
06-09-21
|
조회 3,630
|
|
|
|
06-09-02
|
조회 3,484
|
|
|
|
06-08-08
|
조회 5,114
|
|
|
|
06-07-20
|
조회 3,715
|
|
|
|
06-07-17
|
조회 3,346
|
|
|
|
06-07-13
|
조회 4,169
|
|
|
|
06-07-11
|
조회 3,468
|
|
|
|
06-07-11
|
조회 3,474
|
|
|
|
06-07-11
|
조회 3,831
|
|
|
|
06-06-29
|
조회 6,049
|
|
|
|
06-06-19
|
조회 6,451
|
|
|
|
06-06-02
|
조회 3,506
|
|
|
|
06-05-24
|
조회 4,990
|
|
|
|
06-05-14
|
조회 7,773
|
|
|
|
06-05-08
|
조회 3,881
|
|
|
|
06-02-02
|
조회 5,451
|
|
|
관리자
|
05-12-16
|
조회 4,497
|
|
|
|
05-12-05
|
조회 5,154
|
|
|
|
05-06-28
|
조회 4,102
|
|
|
|
05-04-11
|
조회 4,058
|
|
|
|
05-04-11
|
조회 4,246
|
|
|
|
05-04-11
|
조회 3,312
|
|
|
|
05-03-13
|
조회 3,215
|
|
|
|
05-03-12
|
조회 4,296
|
|
|
관리자
|
04-12-08
|
조회 7,776
|
|
|
|
04-12-01
|
조회 5,182
|
|
|
|
04-11-28
|
조회 3,354
|
|
|
|
04-11-28
|
조회 3,194
|
|
|
|
04-08-05
|
조회 5,609
|
|
|
|
04-08-05
|
조회 4,953
|
|
|
|
04-08-05
|
조회 5,563
|
댓글 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 가 나름 다루기 편해서입니다.
네발가락님 짱^^