PHP
[PHP] - 외부 JSON 데이터 파싱 방법 curl
Vivara
2014. 4. 11. 08:59
반응형
$url = "http://mrkn.tistory.com/jsonResult.php";
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $url);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_USERAGENT, ' `http://mrkn.tistory.com` ');
$json = curl_exec($curl_handle);
curl_close($curl_handle);
반응형