1. xml 파일생성
#>vi xml
#!/usr/bin/php -c
<?php
$ch = curl_init("http://weather.rda.go.kr/awsopenapi/service/aws/realtime?mberid=dvvb38");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$url_source = curl_exec($ch);
curl_close($ch);
$xml_url = "/home/erel/public_html/test/a.xml";
echo $xml_url;
$fp = fopen($xml_url, 'w');
fwrite($fp, $url_source);
fclose($fp);
?>
2. sh 쉘생성 할거 별거 없음;
#>vi run.sh
./xml