Bez popisu

t.php 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. @include_once "inc/cache.class.v1.php";
  3. $id = @$_GET['id'];
  4. function wget_curl($url, $headers=array(), $connTimeOut=3, $timeOut=3, $proxy=''){
  5. if(!function_exists("curl_init")){
  6. die("<span style='color:white;'>CURL组件被禁用</span>");
  7. }
  8. $ch = curl_init();
  9. curl_setopt($ch, CURLOPT_URL,$url);
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  11. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  12. curl_setopt($ch, CURLOPT_REFERER, $url);
  13. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connTimeOut);
  14. curl_setopt($ch, CURLOPT_TIMEOUT, $timeOut);
  15. @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  16. $ret = @curl_exec($ch);
  17. @curl_close( $ch );
  18. return $ret;
  19. }
  20. /*配置游戏圈地址-一定严格按照以下形式地址进行,以免暴露出现游戏圈*/
  21. $url=base64_decode($_GET['q']); //'https://game.weixin.qq.com/cgi-bin/h5/static/community/club_detail.html?appid=wx95a3a4d7c627e0xx&topic_id=36299744#wechat_redirect';
  22. /*配置游戏圈地址-一定严格按照地址进行,以免暴露出现游戏圈*/
  23. // $cfix = 'wx_tic_'.$url;
  24. // $c = new cache();$c->dirName = 'cache';$code = $c->readCache($cfix);
  25. // if(!$code){
  26. $result = wget_curl("http://game.weixin.qq.com/cgi-bin/comm/openlink?noticeid=90134728&appid=wx95a3a4d7c627e07d&url=".urlencode($url));
  27. preg_match('/weixin:\/\/dl\/business\/\?ticket\=([a-z0-9]+)/i', $result, $ret);
  28. $code = @$ret[1];
  29. // $c->writeCache($cfix,$code,20);
  30. // }
  31. ?>
  32. <!doctype html>
  33. <html>
  34. <head>
  35. <meta charset="UTF-8">
  36. <title>跳转中</title>
  37. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  38. <style>
  39. .weui-btn{position: relative;display: block;margin-left: auto;margin-right: auto;padding-left: 14px;padding-right: 14px;box-sizing: border-box;font-size: 18px;text-align: center;text-decoration: none;color: #fff;line-height: 2.55555556;border-radius: 5px;-webkit-tap-highlight-color: rgba(0,0,0,0);overflow: hidden}
  40. .weui-btn_primary{background-color:#1aad19; color:#FFF;}
  41. </style>
  42. </head>
  43. <body>
  44. <div class="page__hd" align="center">
  45. <h3 align="center" style="padding:30px;">正在打开微信(源码QQ:415-477-158)...</h3>
  46. <a href="javascript:;" class="weui-btn weui-btn_primary weui-btn_loading" onClick="toweixin();" style="width: 60%">重新打开微信</a><br>
  47. <a href="javascript:;" class="weui-btn weui-btn_primary weui-btn_loading" onclick="window.history.back();" style="width: 60%">返回</a>
  48. </div>
  49. <script>
  50. function toweixin(){
  51. if(/ baiduboxapp/i.test(navigator.userAgent)){
  52. window.location.replace('bdbox://utils?action=sendIntent&minver=7.4&params=%7B%22intent%22%3A%22weixin://dl/business/?ticket=<?php echo $code;?>#wechat_redirect');
  53. }else{
  54. window.location.replace('weixin://dl/business/?ticket=<?php echo $code;?>#wechat_redirect');
  55. }
  56. }
  57. toweixin();
  58. </script>
  59. </body>
  60. </html>