1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- @include_once "inc/cache.class.v1.php";
- $id = @$_GET['id'];
- function wget_curl($url, $headers=array(), $connTimeOut=3, $timeOut=3, $proxy=''){
- if(!function_exists("curl_init")){
- die("<span style='color:white;'>CURL组件被禁用</span>");
- }
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,$url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- curl_setopt($ch, CURLOPT_REFERER, $url);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connTimeOut);
- curl_setopt($ch, CURLOPT_TIMEOUT, $timeOut);
- @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- $ret = @curl_exec($ch);
- @curl_close( $ch );
- return $ret;
- }
- /*配置游戏圈地址-一定严格按照以下形式地址进行,以免暴露出现游戏圈*/
- $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';
- /*配置游戏圈地址-一定严格按照地址进行,以免暴露出现游戏圈*/
- // $cfix = 'wx_tic_'.$url;
- // $c = new cache();$c->dirName = 'cache';$code = $c->readCache($cfix);
- // if(!$code){
- $result = wget_curl("http://game.weixin.qq.com/cgi-bin/comm/openlink?noticeid=90134728&appid=wx95a3a4d7c627e07d&url=".urlencode($url));
- preg_match('/weixin:\/\/dl\/business\/\?ticket\=([a-z0-9]+)/i', $result, $ret);
- $code = @$ret[1];
- // $c->writeCache($cfix,$code,20);
- // }
- ?>
- <!doctype html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>跳转中</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <style>
- .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}
- .weui-btn_primary{background-color:#1aad19; color:#FFF;}
- </style>
- </head>
- <body>
- <div class="page__hd" align="center">
- <h3 align="center" style="padding:30px;">正在打开微信(源码QQ:415-477-158)...</h3>
- <a href="javascript:;" class="weui-btn weui-btn_primary weui-btn_loading" onClick="toweixin();" style="width: 60%">重新打开微信</a><br>
- <a href="javascript:;" class="weui-btn weui-btn_primary weui-btn_loading" onclick="window.history.back();" style="width: 60%">返回</a>
- </div>
- <script>
- function toweixin(){
- if(/ baiduboxapp/i.test(navigator.userAgent)){
- window.location.replace('bdbox://utils?action=sendIntent&minver=7.4¶ms=%7B%22intent%22%3A%22weixin://dl/business/?ticket=<?php echo $code;?>#wechat_redirect');
- }else{
- window.location.replace('weixin://dl/business/?ticket=<?php echo $code;?>#wechat_redirect');
- }
- }
- toweixin();
- </script>
- </body>
- </html>
|