/*=====1.file_get_contents========*/
$opts = array(
'http'=>array(
'method'=>"GET",
'timeout'=>10,
)
);
//创建数据流上下文
$context = stream_context_create($opts);
//查询成功返回json字符串
$res = @file_get_contents($url,false,$context);
if($res!==FALSE){
}
/*=======2.curl==========*/