tp5中调用接口api中的数据

$url = "https://test.allture.vip/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=goods.qjgm.jifen&mobile=".$integral['mobile'];
 $method ="GET";
 $curl = curl_init();
 curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
 curl_setopt($curl, CURLOPT_URL, $url);
 curl_setopt($curl, CURLOPT_FAILONERROR, false);
 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($curl, CURLOPT_HEADER, false);
 curl_setopt($curl, CURLOPT_ENCODING, "gzip");
 $ret = curl_exec($curl);

 

上一篇:微信小程序:腾讯AI语音合成实践


下一篇:获取远程图片很慢到解决方法,支付宝小程序二维码获取