|
|
|
07-07-30
|
조회 5,130
|
|
|
|
07-07-30
|
조회 5,593
|
|
|
|
07-07-30
|
조회 5,517
|
|
|
|
07-07-29
|
조회 3,925
|
|
|
|
07-07-29
|
조회 3,659
|
|
|
|
07-07-29
|
조회 4,606
|
|
|
|
07-07-29
|
조회 4,467
|
|
|
|
07-07-28
|
조회 4,666
|
|
|
|
07-07-26
|
조회 4,582
|
|
|
|
07-07-25
|
조회 6,234
|
|
|
|
07-07-24
|
조회 6,491
|
|
|
|
07-07-21
|
조회 4,605
|
|
|
|
07-07-21
|
조회 3,960
|
|
|
|
07-07-21
|
조회 4,167
|
|
|
|
07-07-21
|
조회 3,479
|
|
|
|
07-07-21
|
조회 3,314
|
|
|
|
07-07-21
|
조회 3,260
|
|
|
|
07-07-20
|
조회 4,366
|
|
|
|
07-07-20
|
조회 3,508
|
|
|
|
07-07-20
|
조회 3,584
|
|
|
|
07-07-20
|
조회 3,258
|
|
|
|
07-07-20
|
조회 3,715
|
|
|
|
07-07-20
|
조회 4,447
|
|
|
|
07-07-18
|
조회 5,430
|
|
|
|
07-07-18
|
조회 4,628
|
|
|
|
07-07-16
|
조회 3,228
|
|
|
|
07-07-16
|
조회 3,151
|
|
|
|
07-07-13
|
조회 4,128
|
|
|
|
07-07-12
|
조회 2,844
|
|
|
|
07-07-09
|
조회 3,238
|
|
|
|
07-07-07
|
조회 3,476
|
|
|
|
07-07-07
|
조회 3,377
|
|
|
|
07-07-07
|
조회 3,501
|
|
|
|
07-07-06
|
조회 5,318
|
|
|
|
07-07-06
|
조회 3,045
|
|
|
|
07-07-06
|
조회 5,737
|
|
|
|
07-07-06
|
조회 4,295
|
|
|
|
07-07-06
|
조회 3,477
|
|
|
|
07-07-06
|
조회 4,520
|
|
|
|
07-07-06
|
조회 4,140
|
|
|
관리자
|
07-07-05
|
조회 4,126
|
|
|
|
07-07-05
|
조회 6,881
|
|
|
|
07-07-04
|
조회 3,497
|
|
|
|
07-07-02
|
조회 4,654
|
|
|
|
07-06-30
|
조회 4,535
|
|
|
|
07-06-29
|
조회 4,934
|
|
|
|
07-06-29
|
조회 4,464
|
|
|
|
07-06-28
|
조회 3,652
|
|
|
|
07-06-23
|
조회 3,307
|
|
|
|
07-06-21
|
조회 3,772
|
|
|
관리자
|
07-06-20
|
조회 7,440
|
|
|
관리자
|
07-06-20
|
조회 4,050
|
|
|
|
07-06-20
|
조회 5,788
|
|
|
|
07-06-19
|
조회 3,242
|
|
|
|
07-06-19
|
조회 1.1만
|
|
|
|
07-06-17
|
조회 3,706
|
|
|
|
07-06-16
|
조회 2,811
|
|
|
|
07-06-15
|
조회 4,215
|
|
|
|
07-06-12
|
조회 4,169
|
|
|
|
07-06-11
|
조회 4,048
|
|
|
|
07-06-11
|
조회 3,338
|
|
|
|
07-06-05
|
조회 3,681
|
|
|
|
07-06-05
|
조회 4,233
|
|
|
사이버매치스틱
|
07-06-05
|
조회 4,243
|
|
|
|
07-06-05
|
조회 5,348
|
|
|
|
07-06-04
|
조회 7,411
|
|
|
|
07-05-31
|
조회 3,321
|
|
|
관리자
|
07-05-30
|
조회 3,392
|
|
|
예감
|
07-05-29
|
조회 3,089
|
|
|
예감
|
07-05-29
|
조회 2,818
|
|
|
예감
|
07-05-29
|
조회 3,831
|
|
|
예감
|
07-05-29
|
조회 2,913
|
|
|
예감
|
07-05-29
|
조회 2,724
|
|
|
예감
|
07-05-29
|
조회 5,965
|
|
|
예감
|
07-05-29
|
조회 2,979
|
|
|
예감
|
07-05-29
|
조회 3,007
|
|
|
예감
|
07-05-29
|
조회 3,016
|
|
|
예감
|
07-05-29
|
조회 3,128
|
|
|
예감
|
07-05-29
|
조회 4,818
|
|
|
예감
|
07-05-29
|
조회 2,817
|
|
|
예감
|
07-05-29
|
조회 2,680
|
|
|
예감
|
07-05-29
|
조회 2,498
|
|
|
예감
|
07-05-29
|
조회 3,046
|
|
|
예감
|
07-05-29
|
조회 3,084
|
|
|
|
07-05-28
|
조회 5,010
|
|
|
관리자
|
07-05-26
|
조회 3,300
|
|
|
관리자
|
07-05-20
|
조회 4,330
|
|
|
관리자
|
07-05-18
|
조회 6,077
|
|
|
관리자
|
07-05-18
|
조회 4,127
|
|
|
관리자
|
07-05-17
|
조회 9,244
|
|
|
관리자
|
07-05-17
|
조회 5,286
|
|
|
|
07-05-17
|
조회 3,955
|
|
|
관리자
|
07-05-16
|
조회 2,698
|
|
|
관리자
|
07-05-16
|
조회 3,843
|
|
|
|
07-05-15
|
조회 6,269
|
|
|
|
07-05-14
|
조회 6,449
|
|
|
cncafe
|
07-05-13
|
조회 3,286
|
|
|
|
07-05-11
|
조회 5,597
|
|
|
|
07-05-10
|
조회 5,339
|
|
|
|
07-05-10
|
조회 5,409
|
댓글 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 가 나름 다루기 편해서입니다.
네발가락님 짱^^