intenet2.php 986 B

12345678910111213141516171819
  1. <?php
  2. //scope=snsapi_userinfo实例
  3. $appid=$_GET["appid"];
  4. $zfopenid = $_GET["zfopenid"];
  5. $kfopenid = $_GET["kfopenid"];
  6. $toUsername = $_GET["toUsername"];
  7. $json = file_get_contents('json/'.$toUsername.'.json');
  8. //echo $json;
  9. $arr = json_decode($json,true);
  10. $website=$arr['website'];
  11. $kfname = $_GET["kfname"];
  12. $redirect_uri = urlencode ("$website/addons/qidong_app/project2.php?zfopenid=$zfopenid&toUsername=$toUsername&kfopenid=$kfopenid&kfname=$kfname" );
  13. //echo $redirect_uri;
  14. //exit;
  15. $url ="https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri=$redirect_uri&response_type=code&scope=snsapi_userinfo&state=1&component_appid=wx87202cc559004852#wechat_redirect";
  16. // https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxfd603c1640faf7c5&redirect_uri=http://web.woshangtong.com&response_type=code&scope=snsapi_userinfo&state=1&component_appid=wx87202cc559004852id&connect_redirect=1#wechat_redirect
  17. header("Location:".$url);
  18. ?>