第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

正在回答

0 回答


/**
?*?curl?post/get
?*?@param?$url
?*?@param?string?$data
?*?@return?mixed
?*/
public?static?function?http_curl($url,?$data?=?'')
{
????//2初始化
????$ch?=?curl_init();
????//3.設(shè)置參數(shù)
????curl_setopt($ch,?CURLOPT_URL,?$url);
????curl_setopt($ch,?CURLOPT_RETURNTRANSFER,?1);
????curl_setopt($ch,?CURLOPT_SSL_VERIFYPEER,?FALSE);????//不驗(yàn)證證書(shū)
????curl_setopt($ch,?CURLOPT_SSL_VERIFYHOST,?FALSE);????//不驗(yàn)證證書(shū)
????if?(!empty($data))?{
????????curl_setopt($ch,?CURLOPT_CUSTOMREQUEST,?'POST');
????????curl_setopt($ch,?CURLOPT_POSTFIELDS,?$data);
????????curl_setopt($ch,?CURLOPT_RETURNTRANSFER,?true);
????????curl_setopt($ch,?CURLOPT_HTTPHEADER,?array(
????????????????'Content-Type:?application/json',
????????????????'Content-Length:?'?.?strlen($data))
????????);
????}
????//4.調(diào)用接口
????$res?=?curl_exec($ch);
????//5.關(guān)閉curl
????curl_close(?$ch?);
????$arr?=?json_decode($res,?true);
????return?$arr;
}
/**
?*?獲取帶參數(shù)的二維碼??臨時(shí)
?*/
public?function?actionGetTmpQrCode()
{
????//獲取ticket票據(jù)
????$access_token?=?$this->getWxAccessToken();
????$url?=?'https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token='.$access_token;
????//{"expire_seconds":?604800,?"action_name":?"QR_SCENE",?"action_info":?{"scene":?{"scene_id":?123}}}
????$postArr?=?[
????????'expire_seconds'?=>?604800,?//7day
????????'action_name'?=>?'QR_SCENE',
????????'action_info'?=>?[
????????????'scene'?=>?[
????????????????'scene_id'?=>?123
????????????]
????????]
????];
????$postJson?=?json_encode($postArr);
????$res?=?WxHelper::http_curl($url,?$postJson);
????$ticket?=?$res['ticket'];
????//使用ticket獲取二維碼圖片
????$url2?=?'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket='?.?urlencode($ticket);
????//$res2?=?WxHelper::http_curl($url2);
????//展示二維碼
????echo?"<img?src='".$url2."'>";
}


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

北理一猿 提問(wèn)者

非常感謝!
2016-10-20 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)