Micro letter be prevented from accessing the website how to deal with? Restore normal access from the envelope web with the micro 36API

Today, a colleague asked me the background: Why share when the download link to the micro-letter friends, turn on the prompt "stopped to visit the page" App from the inside, but I obviously can open the link in a browser ah.

So I tried it in the public micro-channel number and found it really can not be downloaded. By google discovered that micro-channel is blocked built-in browser download function. Is there a solution? Definitely yes.

Technical means can be realized now directly download the app within the micro-channel function. Here to share with you 366API solutions.


 I. First, we talk about the use of 366API platform:

1, as long as we achieve micro-channel jumps browser interface to open it with 366api
2, copy and paste the link into the tool box api, click on the link and generating a two-dimensional code short jump
3, copy and two-dimensional code connected to the short micro-channel open to link or scan code.


Second, secondly we talk about how to build a micro-channel source browser jump:

1, ios end micro-letter code hints Masking go browser to open

<style type="text/css">   
    .mask {     
            position: absolute; top: 0px; filter: alpha(opacity=60); background-color: #777;   
            z-index: 1002; left: 0px;   
            opacity:0.5; -moz-opacity:0.5;   
        }   
</style>
<pre class="html" name="code"><script type="text/javascript">   
    //兼容火狐、IE8 
    //显示遮罩层  
    function showMask(){   
        $("#mask").css("height",$(document).height());   
        $("#mask").css("width",$(document).width());   
        $("#mask").show();   
    }
    //隐藏遮罩层
    function hideMask(){   
        
        $("#mask").hide();   
    }
   
</script>
<div id="mask" class="mask"></div>  
<a href="javascript:;" onclick="showMask()" >点我显示遮罩层</a><br />

2, Android end micro-channel automatic wake default browser to open Web links code

? <PHP 
// unified call micro-channel whitelist Interface: https: //api.366api.cn/mjgj/link/GetOpenLink callback = getOpenLink & rurl = https:? //dc2.jd.com/auto.php service = transfer & type =? pms & to = (here spliced own content address such http://mjbbs.jd.com/data/attachment/forum/201806/08/173526pb2zpjzzooo2ofze.jpg) 
IF (the GET $ _ [ 'T']) { 
// the include ( "ADMIN / the config.php"); 
// the include ( "ADMIN / function.php"); 
$ code = $ _GET [ 'T']; 
. $ info = Query ( "jump_logs", "WHERE code = '" $ code " '");. 
IF ($ info [' code '] ==' ') { 
    echo' jumps fails'; 
    Exit (0); 
} 
IF ($ info [ 'State'] == '. 1') { 
IF ($ info [ 'COUNT']> = $ info [ 'NUM']) { 
    echo 'jump failed';
    Exit (0); 
} 
$ Time = strtotime ($ info [ 'Time']); 
    if(time() > $time){
        echo 'jump failed';
        Exit; 
    } 
} the else { 
    echo 'jumps fails'; 
    Exit; 
} 
IF ($ info [ 'www_url'] == '') { 
    echo 'Please configure the landing page'; 
    Exit; 
} the else { 
    $ $ = info w_url_code [ 'rl is an']; 
} 
>?
<?php
function get_ticket($code){
    //初始化
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // https请求 不验证证书和hosts
    $headers = array();
    $headers[] = 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X; zh-CN) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/15B202 UCBrowser/11.7.7.1031 Mobile  AliApp(TUnionSDK/0.1.20)';
    $headers[] = 'Referer: https://m.mall.qq.com/release/?busid=mxd2&ADTAG=jcp.h5.index.dis';
    $headers[] = 'Content-Type:application/x-www-form-urlencoded; charset=UTF-8';
 
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    $content = curl_exec($ch);
    curl_close($ch);
    //$arr = json_decode($content,1);
    //if($arr['success'] == '1'){
    //    $shotCode = $arr['shotCode'];
    //}else{
    //    $shotCode = '';
    //}
    //preg_match('/openlink\":\"(.*?)\"}/',$content,$result);
    //$url = $result[1];
     
    preg_match('/href=\"(.*?)#wechat/',$content,$result);
    $url = $result[1];
    return $url;
}
    $time = time()-$info['ticket_time'];
    $minute=floor($time/60);
    query_update ( "jump_logs", "count=count+1". " where code='" . $code . "'" );
    if($minute >= 59) { 
        IF (URL $) {
        $ = get_ticket URL ($ w_url_code);
        // if more than 1 hour, update Ticket
        query_update ( "jump_logs", "ticket_time='".time()."', ticket='" . $url . "' where code='" . $code . "'" );
        $ticket_url = $url.'#';
        if(strpos($_SERVER['HTTP_USER_AGENT'], 'baiduboxapp')||strpos($_SERVER['HTTP_USER_AGENT'], 'baiduboxapp')){//安卓百度手机APP
            echo '<script>window.location.href = "bdbox://utils?action=sendIntent&minver=7.4¶ms=%7b%22intent%22%3a%22'.$url.'%23wechat_redirect%23wechat_redirect%23Intent%3bend%22%7d";</script>';
            }else{
                echo '<script>window.location.href = "'.$ticket_url.'";</script>';
            }
        }
    }else{
        $ticket_url = $info['ticket'].'#';
        if(strpos($_SERVER['HTTP_USER_AGENT'], 'baiduboxapp')||strpos($_SERVER['HTTP_USER_AGENT'], 'baiduboxapp')) {// Andrews Baidu mobile APP
            echo '<script>window.location.href = "bdbox://utils?action=sendIntent&minver=7.4&params=%7b%22intent%22%3a%22'.$info['ticket'].'%23wechat_redirect%23wechat_redirect%23Intent%3bend%22%7d";</script>';
            }else{
                echo '<script>window.location.href = "'.$ticket_url.'";</script>';
            }
    }
}
?>
<!详情可参考:http://www.366api.cn-->


Guess you like

Origin blog.51cto.com/14361275/2401092