无需废话,开始讲解
1.登陆微信开放平台(需要300RMB 开发者认证)
填写回调地址
https://open.weixin.qq.com/cgi-bin/appcreate?t=manage/createWeb&type=app&lang=zh_CN&token=9c040b93af87cbef7ef41596793566f725dec98c
2.
自定义方法:发送http请求
public function curlGet($url){
if(empty($url)){
return false;
}
$output = '';
$ch = curl_init();
$str =$url;
curl_setopt($ch, CURLOPT_URL, $str);
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
$output = curl_exec($ch);
return $output;
}
3.打开网站链接:显示二维码
网址:https://open.weixin.qq.com/connect/qrconnect?appid=appid&redirect_uri=redirect_uri&response_type=code&scope=snsapi_login&state=state
========================