올만에 글을 쓰기는 하네요..피식.
필요하신분.....ㅋㅋ 조심히 쓰세요.....
======================================================
Header("Content-type: text/xml; charset=UTF-8");
$fp = fopen("http://img.search.daum-img.net/jumpkeyword/tot.js","r");
while(!feof($fp)) {
$data=fread($fp,2048);
$text = iconv("CP949","UTF-8",$data);
preg_match_all("/K:\"(.*?)\r\n/i",$text,$matches);
for($i=0;$i<=sizeof($matches[0]);$i++) {
$cno = $matches[0][$i];
$cno = str_replace("K:\"","",$cno);
$cno = str_replace("\"","",$cno);
$cno = str_replace(",","",$cno);
$cno = str_replace("\r\n","",$cno);
$cno = trim($cno);
$chart[$i] = $cno;
}
}
fclose($fp);
$xml = '<?xml version="1.0" encoding="UTF-8" ?>';
$xml .= '<root>';
for($i=0;$i<$chart_cnt;$i++) {
$xml .= "<cno><![CDATA[{$chart[$i]}]]></cno>";
}
$xml .= '</root>';
echo $xml;
======================================================
Link1 | http://banner.adget.co.kr/_mkXML/webseach.xml.php?fs=daum | ||||
Link2 | http://banner.adget.co.kr/_mkXML/webseach.xml.php?fs=naver |