|
|
|
13년 전
|
조회 1,096
|
|
|
|
13년 전
|
조회 1,101
|
|
|
|
13년 전
|
조회 972
|
|
|
|
13년 전
|
조회 872
|
|
|
|
13년 전
|
조회 1,121
|
|
|
|
13년 전
|
조회 1,240
|
|
|
|
13년 전
|
조회 1,726
|
|
|
|
13년 전
|
조회 1,116
|
|
|
|
13년 전
|
조회 1,151
|
|
|
|
13년 전
|
조회 912
|
|
|
|
13년 전
|
조회 1,121
|
|
|
|
13년 전
|
조회 1,068
|
|
|
|
13년 전
|
조회 1,094
|
|
|
|
13년 전
|
조회 1,088
|
|
|
|
13년 전
|
조회 1,102
|
|
|
|
13년 전
|
조회 1,006
|
|
|
|
13년 전
|
조회 1,106
|
|
|
|
13년 전
|
조회 1,100
|
|
|
|
13년 전
|
조회 1,115
|
|
|
|
13년 전
|
조회 1,113
|
|
|
|
13년 전
|
조회 1,893
|
|
|
|
13년 전
|
조회 1,214
|
|
|
|
13년 전
|
조회 1,111
|
|
|
지운아빠
|
13년 전
|
조회 1,165
|
|
|
|
13년 전
|
조회 1,101
|
|
|
|
13년 전
|
조회 845
|
|
|
|
13년 전
|
조회 1,104
|
|
|
|
13년 전
|
조회 2,456
|
|
|
|
13년 전
|
조회 1,101
|
|
|
|
13년 전
|
조회 1,083
|
댓글 8개
하이닉스랑 삼성전자 두개 예제로 걸어놓았네요.. 팍X넷 실시간 데이터입니다.
뭐 이런거도 괜찮으시다믄 힌트를 드리지요
get.php 등으로 저장하신후
get.php?jcode=종목코드 하시면 몇개정보 가져옵니다.
<?
//extract($_POST);
if( isset($_REQUEST["jcode"]) )
$jcode = $_REQUEST["jcode"];
else
$jcode = "";
$jcode = ( $jcode == "" ) ? "005930":$jcode;
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, 'http://hyper.moneta.co.kr/fcgi-bin/DelayedCurrPrice7.fcgi?code='.$jcode.'&isReal=true');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$file_contents = curl_exec($ch);
$flag = "UP";
preg_match_all('/<h2>(.*)<\/h2>/U',$file_contents,$matches ) ;
$nowName = strip_tags($matches[1][0]);
preg_match_all('/<p>(.*)<\/p>/U',$file_contents,$matches ) ;
$nowTime = $matches[1][0];
preg_match_all('/<strong class="up">(.*)<\/strong>/U',$file_contents,$matches ) ;
if( isset($matches[1][0]) )
$nowPrice = ereg_replace("," , "", $matches[1][0]);
else
$nowPrice = "";
if( $nowPrice == "" ) {
preg_match_all('/<strong class="down">(.*)<\/strong>/U',$file_contents,$matches ) ;
$nowPrice = ereg_replace("," , "", $matches[1][0]);
preg_match_all('/<em class="down">(.*)<\/em>/U',$file_contents,$matches ) ;
$chPrice = ereg_replace("," , "", $matches[1][0]);
$chPer = ereg_replace("," , "", $matches[1][1]);
$flag = "DOWN";
} else {
preg_match_all('/<em class="up">(.*)<\/em>/U',$file_contents,$matches ) ;
$chPrice = ereg_replace("," , "", $matches[1][0]);
$chPer = ereg_replace("," , "", $matches[1][1]);
}
$nowTime = explode(" ", $nowTime);
$retStr = $flag."|".$nowName."|".$nowTime[0]."|".$nowTime[1]."|".$nowPrice."|".$chPrice."|".$chPer;
echo iconv("EUC-KR","UTF-8",$retStr);
?>
닫히면.. 다른사이트를 뚫는수밖에요;; ^^