<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://www.test.net/test.php?user_id=qdapplicant");
//
curl_setopt($ch,CURLOPT_HEADER,0);
// ( , curl_exec )
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
//CURLOPT_TIMEOUT cURL 。
//CURLOPT_TIMEOUT_MS cURL 。
//CURLOPT_CONNECTTIMEOUT , 0, 。
//CURLOPT_CONNECTTIMEOUT_MS , 。 0, 。
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
// ( )
$sContent = curl_exec($ch);
curl_close($ch);
// , json_decode , json_decode
$sContent = json_decode($sContent);
// ,
$sContent = mb_convert_encoding($sContent, "GBK", "UTF-8");
print_r($sContent);
//http://huangqiqing123.iteye.com/blog/1741221
?>