QQ打开链接跳转浏览器代码

2022-12-28 20:04:40 浏览数 (1)

QQ打开链接跳转浏览器代码:自动识别是否为QQ内打开,如是将自动跳转浏览器,也可复制网址自己打开,复制下方代码加入到你的页面中就可实现。 目的是为了防止QQ拦截;如有帮助到你,请记得收藏

代码语言:javascript复制
$conf['qqjump']=1;
if(strpos($_SERVER['HTTP_USER_AGENT'], 'QQ/')||strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger')!==false && $conf['qqjump']==1){
$siteurl='http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
echo '

    
    使用浏览器打开
    
    
    
    
    
    
    
        body,html{width:100%;height:100%}
        *{margin:0;padding:0}
        body{background-color:#fff}
        #browser img{
            width:50px;
        }
        #browser{
            margin: 0px 10px;
            text-align:center;
        }
        #contens{
            font-weight: bold;
            margin:-285px 0px 10px;
            text-align:center;
            font-size:20px;
            margin-bottom: 125px;
        }
        .top-bar-guidance{font-size:15px;color:#fff;height:70%;line-height:1.8;padding-left:20px;padding-top:20px;background:url(https://img.yuanmabao.com/zijie/pic/2022/12/28/iib32dwribq.com) center top/contain no-repeat}
        .top-bar-guidance .icon-safari{width:25px;height:25px;vertical-align:middle;margin:0 .2em}
        .app-download-tip{margin:0 auto;width:290px;text-align:center;font-size:15px;color:#2466f4;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcAQMAAACak0ePAAAABlBMVEUAAAAdYfh GakkAAAAAXRSTlMAQObYZgAAAA5JREFUCNdjwA8acEkAAAy4AIE4hQq/AAAAAElFTkSuQmCC) left center/auto 15px repeat-x}
        .app-download-tip .guidance-desc{background-color:#fff;padding:0 5px}
        .app-download-btn{display:block;width:214px;height:40px;line-height:40px;margin:18px auto 0 auto;text-align:center;font-size:18px;color:#2466f4;border-radius:20px;border:.5px #2466f4 solid;text-decoration:none}
    



    点击右上角 浏览器打开
    可以继续浏览本站哦~



    
    
    
    
    


 因QQ自带浏览器不支持跳转
请点击右上角使用其他浏览器

    忘心博客:http://tt.wxkj.xyz/


$.getScript("http://cn.battleofballs.com/share?type=3&id=45302205",function(data){});

function openu(u){
document.getElementById("vurl").href= u;
document.getElementById("vurl").click();
}
var url = window.location.href;
    if(navigator.userAgent.indexOf("QQ/")> -1){
        openu("ucbrowser://" url);
        openu("mttbrowser://url=" url);
        openu("baiduboxapp://browse?url=" url);
        openu("googlechrome://browse?url=" url);
        openu("mibrowser:" url);

        $("html").on("click",function(){
            openu("ucbrowser://" url);
            openu("mttbrowser://url=" url);
            openu("baiduboxapp://browse?url=" url);
            openu("googlechrome://browse?url=" url);
            openu("mibrowser:" url);

        });
    }else if(navigator.userAgent.indexOf("MicroMessenger") > -1){
        if(navigator.userAgent.indexOf("Android") > -1){
            var iframe = document.createElement("iframe");
            iframe.style.display = "none";
            document.body.appendChild(iframe);
        }else{
              
        }
    }

';
exit; 
} 

本文参考:忘心博客

0 人点赞