|
|
|
13년 전
|
조회 1,081
|
|
|
|
13년 전
|
조회 1,082
|
|
|
|
13년 전
|
조회 955
|
|
|
|
13년 전
|
조회 853
|
|
|
|
13년 전
|
조회 1,098
|
|
|
|
13년 전
|
조회 1,225
|
|
|
|
13년 전
|
조회 1,710
|
|
|
|
13년 전
|
조회 1,098
|
|
|
|
13년 전
|
조회 1,134
|
|
|
|
13년 전
|
조회 890
|
|
|
|
13년 전
|
조회 1,092
|
|
|
|
13년 전
|
조회 1,043
|
|
|
|
13년 전
|
조회 1,081
|
|
|
|
13년 전
|
조회 1,070
|
|
|
|
13년 전
|
조회 1,089
|
|
|
|
13년 전
|
조회 986
|
|
|
|
13년 전
|
조회 1,088
|
|
|
|
13년 전
|
조회 1,085
|
|
|
|
13년 전
|
조회 1,096
|
|
|
|
13년 전
|
조회 1,096
|
|
|
|
13년 전
|
조회 1,875
|
|
|
|
13년 전
|
조회 1,201
|
|
|
|
13년 전
|
조회 1,096
|
|
|
지운아빠
|
13년 전
|
조회 1,148
|
|
|
|
13년 전
|
조회 1,084
|
|
|
|
13년 전
|
조회 831
|
|
|
|
13년 전
|
조회 1,085
|
|
|
|
13년 전
|
조회 2,438
|
|
|
|
13년 전
|
조회 1,080
|
|
|
|
13년 전
|
조회 1,065
|
댓글 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);
?>
닫히면.. 다른사이트를 뚫는수밖에요;; ^^