w实践,满足当前需求。

www.w.com

www.w.com/w1.php

$wxurl='https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$wxwid.'&redirect_uri=http://www.w.com/woauth2.php&response_type=code&scope=snsapi_base&state=1#wechat_redirect';
header('Location: '.$wxurl);

www.w.com/woauth2.php

$wxurl = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$wxwid
.'&secret='.$wxws; $wxr_code = $_REQUEST['code']; $wxurl='https://api.weixin.qq.com/sns/oauth2/access_token?appid='.$wxwid
.'&secret='.$wxws.'&code='.$wxr_code.'&grant_type=authorization_code';
$result = file_get_contents($wxurl);
$res =json_decode($result, true);
var_dump($res);
$wxr_openid=$res['openid'];
var_dump($wxr_openid);

最新文章

  1. debian的版本演进
  2. STL容器删除元素的陷阱
  3. 第三篇 Integration Services:增量加载-Adding Rows
  4. Codeforces Round #378 (Div. 2) C. Epidemic in Monstropolis 模拟
  5. 解决Lost connection to MySQL server at 'reading initial communication packet', 的方法
  6. 自定义绘制View
  7. android异步Http框架
  8. Gazebo機器人仿真學習探索筆記(二)基本使用說明
  9. 分享一个.NET平台开源免费跨平台的大数据分析框架.NET for Apache Spark
  10. ubuntu 16.04 安装 opencv +contrib (3.2.0) + python 3.5
  11. php安全编程&python测试实例编写
  12. 你的B计划在哪里?
  13. Socket网络编程(三)
  14. Jumpserver跳板机的搭建和部署
  15. 12.17 Daily Scrum
  16. SQL中on条件与where条件的区别
  17. Kafka创建Topic时如何将分区放置到不同的Broker中
  18. nutch相关目录说明
  19. Oracle RAC Failover 详解
  20. 模板:CDQ分治

热门文章

  1. Ubuntu环境下使用npm安装node模块时报错的处理方法
  2. dfs带状态改变的做法
  3. 基于jQuery的图片异步加载和预加载实例
  4. hdu6153 扩展kmp求一个字符串的后缀在另一个字符串出现的次数。
  5. EF常用查询语句
  6. 记一次线上Kafka消息堆积踩坑总结
  7. 数据库 proc编程四
  8. 【转】【Linux】sed命令详解
  9. Http缺省的请求方法是。(选择1项)
  10. 【BZOJ】1176: [Balkan2007]Mokia(cdq分治)