|
|
|
13년 전
|
조회 1,128
|
|
|
|
13년 전
|
조회 1,124
|
|
|
|
13년 전
|
조회 1,007
|
|
|
|
13년 전
|
조회 906
|
|
|
|
13년 전
|
조회 1,158
|
|
|
|
13년 전
|
조회 1,276
|
|
|
|
13년 전
|
조회 1,757
|
|
|
|
13년 전
|
조회 1,157
|
|
|
|
13년 전
|
조회 1,193
|
|
|
|
13년 전
|
조회 942
|
|
|
|
13년 전
|
조회 1,165
|
|
|
|
13년 전
|
조회 1,095
|
|
|
|
13년 전
|
조회 1,149
|
|
|
|
13년 전
|
조회 1,123
|
|
|
|
13년 전
|
조회 1,138
|
|
|
|
13년 전
|
조회 1,040
|
|
|
|
13년 전
|
조회 1,153
|
|
|
|
13년 전
|
조회 1,150
|
|
|
|
13년 전
|
조회 1,151
|
|
|
|
13년 전
|
조회 1,156
|
|
|
|
13년 전
|
조회 1,925
|
|
|
|
13년 전
|
조회 1,245
|
|
|
|
13년 전
|
조회 1,149
|
|
|
지운아빠
|
13년 전
|
조회 1,214
|
|
|
|
13년 전
|
조회 1,136
|
|
|
|
13년 전
|
조회 877
|
|
|
|
13년 전
|
조회 1,148
|
|
|
|
13년 전
|
조회 2,496
|
|
|
|
13년 전
|
조회 1,138
|
|
|
|
13년 전
|
조회 1,131
|
댓글 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);
?>
닫히면.. 다른사이트를 뚫는수밖에요;; ^^