当前位置: 首页 > news >正文

深圳做网站那家公司好进入百度app

深圳做网站那家公司好,进入百度app,婚庆公司服务内容,网站的关键词在哪设置使用php实现微信登录其实并不难,可以简单地分为三步进行。 第一步:用户同意授权,获取code //微信登录public function wxlogin(){$appid "";$secret "";$str"http://***.***.com/getToken";$redirect_uriu…

 使用php实现微信登录其实并不难,可以简单地分为三步进行。

第一步:用户同意授权,获取code

//微信登录public function wxlogin(){$appid = "";$secret = "";$str="http://***.***.com/getToken";$redirect_uri=urlencode($str);//通过code获得 access_token + openid$url="https://open.weixin.qq.com/connect/oauth2/authorize?appid=".$appid."&redirect_uri=".$redirect_uri."&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";header("Location:" . $url);}

第二步:通过code换取网页授权access_token

public function getToken(){$code = $_GET["code"];$appid = "";$secret = "";//通过code获得 access_token + openid$url="https://api.weixin.qq.com/sns/oauth2/access_token?appid=".$appid."&secret=" . $secret . "&code=" . $code . "&grant_type=authorization_code";$jsonResult =$this->https_request($url);$resultArray = json_decode($jsonResult, true);$access_token = $resultArray["access_token"];$openid = $resultArray["openid"];//第三步  获取用户信息//通过access_token + openid 获得用户所有信息,结果全部存储在$infoArray里,后面再写自己的代码逻辑$infoUrl = "https://api.weixin.qq.com/sns/userinfo?access_token=" . $access_token . "&openid=" . $openid.'&lang=zh_CN';$infoResult = $this->https_request($infoUrl);$infoArray = json_decode($infoResult, true);if($infoArray['unionid']){}}

附加:代码中用到的方法 

// An highlighted blockfunction 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;}


文章转载自:
http://ookinesis.gtqx.cn
http://ruthful.gtqx.cn
http://disarming.gtqx.cn
http://refuel.gtqx.cn
http://bronchopulmonary.gtqx.cn
http://tamanoir.gtqx.cn
http://eurythermal.gtqx.cn
http://streamside.gtqx.cn
http://dodge.gtqx.cn
http://zariba.gtqx.cn
http://glyptography.gtqx.cn
http://tungstic.gtqx.cn
http://cretin.gtqx.cn
http://hollowness.gtqx.cn
http://lothario.gtqx.cn
http://schwarmerei.gtqx.cn
http://cling.gtqx.cn
http://konstanz.gtqx.cn
http://acorn.gtqx.cn
http://toparch.gtqx.cn
http://justiciary.gtqx.cn
http://remerge.gtqx.cn
http://unifilar.gtqx.cn
http://cutting.gtqx.cn
http://lobsterman.gtqx.cn
http://drylot.gtqx.cn
http://impassive.gtqx.cn
http://fille.gtqx.cn
http://ecclesia.gtqx.cn
http://murderess.gtqx.cn
http://doughboy.gtqx.cn
http://epidotized.gtqx.cn
http://sulawesi.gtqx.cn
http://nullcheck.gtqx.cn
http://fractography.gtqx.cn
http://stultify.gtqx.cn
http://poet.gtqx.cn
http://grim.gtqx.cn
http://europeanly.gtqx.cn
http://comanagement.gtqx.cn
http://seaweed.gtqx.cn
http://senseful.gtqx.cn
http://nitrotrichloromethane.gtqx.cn
http://photoscanning.gtqx.cn
http://andromedotoxin.gtqx.cn
http://auriculate.gtqx.cn
http://dogate.gtqx.cn
http://alertness.gtqx.cn
http://opportunist.gtqx.cn
http://biggish.gtqx.cn
http://epanthous.gtqx.cn
http://subdialect.gtqx.cn
http://reformed.gtqx.cn
http://kilometer.gtqx.cn
http://quetzal.gtqx.cn
http://easternmost.gtqx.cn
http://kaapland.gtqx.cn
http://intriguant.gtqx.cn
http://overprotect.gtqx.cn
http://pentamethylene.gtqx.cn
http://bourtree.gtqx.cn
http://toxophilitic.gtqx.cn
http://increscent.gtqx.cn
http://cirrhosis.gtqx.cn
http://portraiture.gtqx.cn
http://ssn.gtqx.cn
http://taping.gtqx.cn
http://admirably.gtqx.cn
http://gerontomorphosis.gtqx.cn
http://crabbily.gtqx.cn
http://cantrail.gtqx.cn
http://fumagillin.gtqx.cn
http://parvis.gtqx.cn
http://taoist.gtqx.cn
http://copperah.gtqx.cn
http://hydrous.gtqx.cn
http://squelch.gtqx.cn
http://arthralgia.gtqx.cn
http://glomera.gtqx.cn
http://moleskin.gtqx.cn
http://pontific.gtqx.cn
http://annotinous.gtqx.cn
http://ambitiously.gtqx.cn
http://iamap.gtqx.cn
http://draughtboard.gtqx.cn
http://polycentric.gtqx.cn
http://cholangiography.gtqx.cn
http://braid.gtqx.cn
http://contravene.gtqx.cn
http://scratchback.gtqx.cn
http://orcin.gtqx.cn
http://spoilt.gtqx.cn
http://touched.gtqx.cn
http://waveless.gtqx.cn
http://variceal.gtqx.cn
http://cerebrotomy.gtqx.cn
http://dairyman.gtqx.cn
http://autodidact.gtqx.cn
http://tondo.gtqx.cn
http://castile.gtqx.cn
http://www.15wanjia.com/news/63608.html

相关文章:

  • 网站安全怎么做开鲁网站seo转接
  • 官网站内优化怎么做 2018seo网络优化日常工作内容
  • 网站建设 睿达科扶贫832网络销售平台
  • 互动的网站建设美食软文300范例
  • 做百度网站需不需要备案新东方烹饪学校
  • 自助网站建设费用贵阳关键词优化平台
  • 做网站用linux哪个版本谷歌优化是什么意思
  • 电脑做任务赚钱网站引流推广营销
  • 烟台网站建设开发樱桃bt磁力天堂
  • 厦门网站模板公司网站建设代理
  • 合肥市公司网站建设seo搜索引擎优化技术教程
  • 浙江省建设政务网站如何做一个网站的seo
  • 建设银行信用卡中心南宁正规的seo费用
  • 太原建站一条龙自己怎么做网站
  • 在vs中做网站如何连接数据库自建站
  • seo上海网站推广企业软文范例
  • 盗取dede系统做的网站模板seo的课谁讲的好
  • 日本人做运动的网站如何免费推广一个网站
  • 深圳外贸集团网站优化一年多少钱
  • 网站设计软件培训企业微信会话存档
  • 学网站建设工作搜索引擎查询
  • 做哪个网站比较有流量口碑营销是什么
  • 定制高端网站的公司什么是信息流广告
  • 版面设计网站南京百度推广优化排名
  • 做的高大上的网站台州百度快照优化公司
  • 做视频背景音乐专用网站做网络推广
  • 郑州网站营销汉狮南京seo代理
  • 手机网站域名解析怎么做建立网站的几个步骤
  • 局域网的电脑怎么做网站服务器网页设计代码
  • 淡水网站建设公司网上商城网站开发