|
|
|
08-11-25
|
조회 3,758
|
|
|
|
08-11-25
|
조회 2,950
|
|
|
|
08-11-25
|
조회 4,528
|
|
|
|
08-11-25
|
조회 4,400
|
|
|
관리자
|
08-11-21
|
조회 4,380
|
|
|
|
08-11-21
|
조회 5,310
|
|
|
관리자
|
08-11-20
|
조회 3,934
|
|
|
|
08-11-20
|
조회 3,748
|
|
|
관리자
|
08-11-19
|
조회 4,018
|
|
|
관리자
|
08-11-19
|
조회 4,260
|
|
|
관리자
|
08-11-18
|
조회 4,041
|
|
|
|
08-11-15
|
조회 2,918
|
|
|
관리자
|
08-11-14
|
조회 3,220
|
|
|
관리자
|
08-11-14
|
조회 2,885
|
|
|
|
08-11-14
|
조회 3,280
|
|
|
관리자
|
08-11-13
|
조회 3,906
|
|
|
관리자
|
08-11-12
|
조회 1만
|
|
|
관리자
|
08-11-07
|
조회 4,605
|
|
|
관리자
|
08-11-07
|
조회 5,592
|
|
|
|
08-11-03
|
조회 3,355
|
|
|
|
08-11-01
|
조회 5,069
|
|
|
|
08-11-01
|
조회 3,021
|
|
|
|
08-10-30
|
조회 2,727
|
|
|
|
08-10-30
|
조회 3,662
|
|
|
|
08-10-30
|
조회 2,760
|
|
|
|
08-10-30
|
조회 2,996
|
|
|
|
08-10-30
|
조회 2,857
|
|
|
카이루
|
08-10-29
|
조회 3,942
|
|
|
|
08-10-29
|
조회 2,920
|
|
|
|
08-10-29
|
조회 2,456
|
|
|
|
08-10-20
|
조회 2,583
|
|
|
|
08-10-18
|
조회 4,535
|
|
|
|
08-10-16
|
조회 3,585
|
|
|
|
08-10-16
|
조회 3,393
|
|
|
똥싼너구리
|
08-10-14
|
조회 2,591
|
|
|
|
08-10-11
|
조회 3,893
|
|
|
너굴군
|
08-10-11
|
조회 2,492
|
|
|
|
08-10-09
|
조회 2,586
|
|
|
|
08-10-09
|
조회 2,742
|
|
|
|
08-10-09
|
조회 4,211
|
|
|
|
08-10-08
|
조회 3,906
|
|
|
|
08-10-02
|
조회 3,848
|
|
|
|
08-10-02
|
조회 2,595
|
|
|
|
08-10-02
|
조회 2,737
|
|
|
|
08-09-29
|
조회 4,669
|
|
|
|
08-09-29
|
조회 4,301
|
|
|
|
08-09-26
|
조회 5,617
|
|
|
관리자
|
08-09-26
|
조회 3,587
|
|
|
관리자
|
08-09-26
|
조회 3,653
|
|
|
관리자
|
08-09-26
|
조회 2,796
|
|
|
관리자
|
08-09-26
|
조회 3,840
|
|
|
관리자
|
08-09-26
|
조회 3,578
|
|
|
관리자
|
08-09-26
|
조회 4,340
|
|
|
|
08-09-22
|
조회 3,901
|
|
|
|
08-09-22
|
조회 3,085
|
|
|
관리자
|
08-09-22
|
조회 4,051
|
|
|
관리자
|
08-09-22
|
조회 3,008
|
|
|
관리자
|
08-09-22
|
조회 2,661
|
|
|
|
08-09-21
|
조회 3,648
|
|
|
|
08-09-20
|
조회 4,231
|
|
|
|
08-09-20
|
조회 5,500
|
|
|
|
08-09-20
|
조회 4,597
|
|
|
|
08-09-20
|
조회 2,912
|
|
|
|
08-09-20
|
조회 3,319
|
|
|
|
08-09-20
|
조회 3,684
|
|
|
|
08-09-20
|
조회 3,061
|
|
|
|
08-09-20
|
조회 3,253
|
|
|
|
08-09-20
|
조회 4,233
|
|
|
|
08-09-20
|
조회 3,736
|
|
|
|
08-09-20
|
조회 3,316
|
|
|
|
08-09-19
|
조회 5,713
|
|
|
|
08-09-19
|
조회 4,490
|
|
|
관리자
|
08-09-19
|
조회 2,801
|
|
|
|
08-09-18
|
조회 5,154
|
|
|
|
08-09-18
|
조회 4,233
|
|
|
|
08-09-18
|
조회 3,607
|
|
|
|
08-09-18
|
조회 2,805
|
|
|
|
08-09-18
|
조회 3,713
|
|
|
|
08-09-18
|
조회 3,508
|
|
|
관리자
|
08-09-17
|
조회 3,378
|
|
|
|
08-09-16
|
조회 3,323
|
|
|
|
08-09-10
|
조회 2,534
|
|
|
|
08-09-09
|
조회 3,336
|
|
|
|
08-09-06
|
조회 4,228
|
|
|
|
08-09-06
|
조회 2,783
|
|
|
|
08-09-06
|
조회 3,156
|
|
|
|
08-09-06
|
조회 2,822
|
|
|
|
08-09-06
|
조회 3,048
|
|
|
|
08-09-06
|
조회 2,932
|
|
|
|
08-09-06
|
조회 2,909
|
|
|
|
08-09-05
|
조회 3,909
|
|
|
|
08-09-05
|
조회 3,733
|
|
|
|
08-09-05
|
조회 3,559
|
|
|
|
08-09-05
|
조회 2,780
|
|
|
|
08-09-05
|
조회 3,809
|
|
|
|
08-09-05
|
조회 5,773
|
|
|
|
08-09-05
|
조회 4,225
|
|
|
|
08-09-05
|
조회 3,112
|
|
|
|
08-09-05
|
조회 3,267
|
|
|
|
08-09-05
|
조회 4,691
|
댓글 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 가 나름 다루기 편해서입니다.
네발가락님 짱^^