Rumah > Artikel > pembangunan bahagian belakang > PHP调用出json后出来的数字 想隐藏掉 50份求高手帮忙下!
qianming.php 原文
$code = $_GET['code'];//前端传来的code值
$appid = "10";
$appsecret = "张小花";
$url = "http://123456.com/actForm.ashx?action=addorder&gameid=65&num=$appid&realname=520520&UserEmail=xiaomeng@qq.com&SearchPass=$appsecret";
$result = https_request($url);
$json = json_decode($result, true);
$id = explode('_',$json['msg']);
echo $id[1];
function https_request($url,$data = null){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
if (!empty($data)){
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
}
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($curl);
curl_close($curl);
return $output;
}
?>
nbsp;html>
14102423250754238
nbsp;html>
...
$id = explode('_',$json['msg']);
//echo $id[1];
function https_request($url,$data = null){
...
昨天用了我代码,你也不测试,echo也不注释,真够懒的
昨天用了我代码,你也不测试,echo也不注释,真够懒的