Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
ltman.eemo.co.kr
/
public_html
/
www
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/ltman.eemo.co.kr/public_html/www/crontab_croll_cc_sise_other.php
<? session_cache_limiter('no-cache, must-revalidate'); session_start(); header("Pragma: no-cache"); header("Cache-Control: no-cache,must-revalidate"); header("Content-Type: text/html; charset=utf-8"); session_cache_limiter('no-cache, must-revalidate'); session_start(); $wshome="/home/nonga.eemo.co.kr/public_html/www"; $WSSERIP="127.0.0.1"; include_once($wshome."/dbconn.php"); include_once($wshome."/lib.php"); include ("simple_html_dom.php"); ini_set('max_execution_time',3600); foreach($_GET as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } foreach($_POST as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } $url = 'http://www.chicken.or.kr/ch_price/price.php'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_ENCODING, 'UTF-8'); //curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $response = curl_exec($ch); curl_close ($ch); $html=str_get_html($response); //echo $response; $rtn=array(); $prev=""; $res=array(); foreach($html->find('table[class=tb_comm2 w100 mt10]') as $element) { $nn=0; foreach($element->find('tr[class=tbody_Bg]') as $el3) { if($nn==0) { $col=1; foreach($el3->find('td') as $el6) { $vv_data6=strip_tags(trim(strtolower($el6)),""); $vv_data6=str_replace("\t","",$vv_data6); $vv_data6=trim($vv_data6); if($vv_data6) { if($col==1) { $rtn['jdate']=date('Y-').date('m-d',strtotime($vv_data6)); } else if($col==3) { $rtn['v1']=str_replace(",","",$vv_data6); } else if($col==4) { $rtn['v2']=str_replace(",","",$vv_data6); } else if($col==5) { $rtn['v3']=str_replace(",","",$vv_data6); } else if($col==6) { $rtn['v4']=str_replace(",","",$vv_data6); } echo $col."/".$vv_data6."<br>"; } $col++; } if($rtn['jdate']) { $is_rs=RS("select * from bro_cc_sise where jdate='{$rtn['jdate']}' and type='chicken' "); if(!$is_rs[no]) { $query="insert into bro_cc_sise set jdate='{$rtn['jdate']}', v1='{$rtn['v1']}', v2='{$rtn['v2']}', v3='{$rtn['v3']}', v4='{$rtn['v4']}', type='chicken', uptime=now() "; mysql_query($query) or die(); } } } $nn++; $row++; } } ?>