|
发表于 2013-3-11 22:07:58
|
显示全部楼层
如果主机支持curl,可用curl函数代替:
PHP复制代码 case 'POST': $ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER , TRUE);
curl_setopt($ch, CURLOPT_POST , TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS , http_build_query($params));
curl_setopt($ch, CURLOPT_URL , $url);
$response = curl_exec($ch);
curl_close($ch);
$return = json_decode($response, true);
break; 复制代码
|
|