Micro-channel browser does not support downloading a file or application solutions --366API how to jump to the default browser to open

Scene analysis

When we share a link or two-dimensional code in the micro letter, we will find that our site is normally open in the browser, but is not open in the micro letter, suggesting that "stopped to visit the page", both the chat box, too. He said that the system has detected that your web site is shielded micro-channel strategy, have any questions please go to the micro-channel interception page appeal process. I believe that most use micro letter forwarding the link to share with friends, have encountered problems in the micro-channel link can not be opened. This typically micro-channel will give tips "stopped to visit the web site" factors leading to this situation are the following four points.

 1, web links were reported too many times. 2, pages containing illegal content, including sensitive words. 3, the detection system determines Tencent induction share. 4, the number of forwards on the share.


So address this issue, close-up this article to share treatment options before our company. First, if we do not have professional technical team, we can look for a provider of a team of this technology, we have been using before is 366API platform interface, the results were good, very stable. Then if we have our own technical team, a jump can write their own programs, reference case see below.

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

1 Use your browser to open the platform we need to use 366API

2. Copy and paste the link into the api tool box, click on the link and generates a short jump two-dimensional code

3, the two-dimensional code and the short connecting replication micro channel to open or scan code to link.

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

1, ios end micro-channel Masking prompt access to the open source browser

<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();   
    }
    //Hide mask layer 
    function hideMask () {    
        
        $ ( " #mask " ) .hide ();    
    }
   
 </ Script>
<div id="mask" class="mask"></div>  
<a href="javascript:;" onclick="showMask()" >点我显示遮罩层</a><br />
? < 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 as HTTP: // mjbbs.jd.com/data/attachment/forum/201806/08/173526pb2zpjzzooo2ofze.jpg) 
IF ($ _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 ' jumps fails ' ; 
    Exit ( 0 );
}
$time = strtotime($info[' Time ' ]);
     IF (Time ()> $ Time) { 
        echo ' jumps fails ' ; 
        Exit; 
    } 
} the else { 
    echo ' jumps fails ' ; 
    Exit; 
} 
IF ($ info [ ' www_url ' ] == '' ) { 
    echo ' please configure the landing page ' ; 
    Exit; 
} the else { 
    $ w_url_code = $ info [ ' rl is an ' ]; 
}
 >?

? < PHP 
function get_ticket ($ code) { 
    // Initialization 
    $ CH = curl_init (); 
    curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, FALSE); // HTTPS request does not verify the certificate and hosts 
    $ headers = Array (); 
    $ headers [] = ' the User-- Agent: the Mozilla / 5.0 (the iPhone; the CPU the iPhone the OS like the Mac the OS X-11_1_2; ZH-the CN) AppleWebKit / 537.51.1 (KHTML, like the Gecko) Mobile / 15B202 UCBrowser / 11.7.7.1031 Mobile AliApp (TUnionSDK / 0.1 .20) ' ; 
    $ headers [] = ' the 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){
        //如果超过1小时,更新ticket
        $url = get_ticket($w_url_code);
        if($url){
        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&params=%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')){//安卓百度手机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 www.cnblogs.com/jinlous/p/10945738.html