您好,登錄后才能下訂單哦!
使用方法,復(fù)制以下貼到index.php 頂部就可以了.
場(chǎng)景 比如網(wǎng)頁包含視頻播放??在QQ\WX打開QQ\WX直接調(diào)用自己的播放器播放,而且播放完成還有AD推送,非常惡心,所以有了以下代碼有亂碼的話說明你網(wǎng)頁是GBK??自行轉(zhuǎn)換下
<?php function?qqwx(){? ????if?(?strpos($_SERVER['HTTP_USER_AGENT'],?'MicroMessenger')?!==?false?)?{ echo?'<!DOCTYPE?html> <html> ??<head> ??????<meta?http-equiv="Content-Language"?content="zh-CN"> ????<meta?http-equiv="content-type"?content="text/html;?charset=utf-8"?/> ????<meta?id="viewport"?name="viewport"?content="width=device-width,?initial-scale=1.0,maximum-scale=1.0,?user-scalable=0"?/> ????<meta?content="telephone=no"?name="format-detection"?/> ? ????<title>提示</title> ???? ????<style> ????????html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{line-height:1.6;font-family:"Helvetica?Neue",Helvetica,Arial,sans-serif;font-size:16px}body,h2,h3,h4,h5,h6,p,ul,ol,dl,dd,fieldset,textarea{margin:0}fieldset,legend,textarea,input,button{padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;*font-family:"Helvetica?Neue",Helvetica,Arial,sans-serif}ul,ol{padding-left:0;list-style-type:none;list-style-position:inside}a?img,fieldset{border:0}a{text-decoration:none} ? ????????body{ ????????????color:#222; ????????????font-size:?12px; ????????????padding:?120px?15px?20px; ????????????text-align:center; ????????} ????????h4{? ????????????font-size:?18px;? ????????????font-weight:?normal; ????????????margin-bottom:?13px; ????????} ????????.url{ ????????????padding:?5px?0; ????????????word-break:break-all; ????????} ????</style> ??</head> ??<body?url="http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'"> ????<div?class=""> ????????<h4>請(qǐng)長(zhǎng)按網(wǎng)址復(fù)制后使用瀏覽器訪問</h4> ????????<div?id="url"?class="url"></div> ????</div> ????<script> ????????var?text?=?document.createTextNode(document.body.getAttribute("url").replace(/&/g,?"&")); ????????document.getElementById("url").appendChild(text); ????</script> ??</body> </html>'; exit();?????}???? ????????if?(?strpos($_SERVER['HTTP_USER_AGENT'],?'QQ/')?!==?false?)?{ echo?'<!DOCTYPE?html> <html> ??<head> ?? ????<script?src="https://open.mobile.qq.com/sdk/qqapi.js?_bid=152"></script> ??<script?type="text/javascript">?mqq.ui.openUrl({?target:?2,url:?"http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'"});?</script> ????<meta?http-equiv="Content-Language"?content="zh-CN"> ????<meta?http-equiv="content-type"?content="text/html;?charset=utf-8"?/> ????<meta?id="viewport"?name="viewport"?content="width=device-width,?initial-scale=1.0,maximum-scale=1.0,?user-scalable=0"?/> ????<meta?content="telephone=no"?name="format-detection"?/> ? ????<title>提示</title> ???? ????<style> ????????html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{line-height:1.6;font-family:"Helvetica?Neue",Helvetica,Arial,sans-serif;font-size:16px}body,h2,h3,h4,h5,h6,p,ul,ol,dl,dd,fieldset,textarea{margin:0}fieldset,legend,textarea,input,button{padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;*font-family:"Helvetica?Neue",Helvetica,Arial,sans-serif}ul,ol{padding-left:0;list-style-type:none;list-style-position:inside}a?img,fieldset{border:0}a{text-decoration:none} ? ????????body{ ????????????color:#222; ????????????font-size:?12px; ????????????padding:?120px?15px?20px; ????????????text-align:center; ????????} ????????h4{? ????????????font-size:?18px;? ????????????font-weight:?normal; ????????????margin-bottom:?13px; ????????} ????????.url{ ????????????padding:?5px?0; ????????????word-break:break-all; ????????} ????</style> ??</head> ??<body?url="http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'"> ????<div?class=""> ????????<h4>如需瀏覽,請(qǐng)長(zhǎng)按網(wǎng)址復(fù)制后使用瀏覽器訪問</h4> ????????<div?id="url"?class="url"></div> ????</div> ????<script> ????????var?text?=?document.createTextNode(document.body.getAttribute("url").replace(/&/g,?"&")); ????????document.getElementById("url").appendChild(text); ????</script> ??</body> </html>'; exit(); ????}?? } qqwx(); ?<?php function?qqwx(){? ????if?(?strpos($_SERVER['HTTP_USER_AGENT'],?'MicroMessenger')?!==?false?)?{ echo?'<!DOCTYPE?html> <html> ??<head> ??????<meta?http-equiv="Content-Language"?content="zh-CN"> ????<meta?http-equiv="content-type"?content="text/html;?charset=utf-8"?/> ????<meta?id="viewport"?name="viewport"?content="width=device-width,?initial-scale=1.0,maximum-scale=1.0,?user-scalable=0"?/> ????<meta?content="telephone=no"?name="format-detection"?/> ? ????<title>提示</title> ???? ????<style> ????????html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{line-height:1.6;font-family:"Helvetica?Neue",Helvetica,Arial,sans-serif;font-size:16px}body,h2,h3,h4,h5,h6,p,ul,ol,dl,dd,fieldset,textarea{margin:0}fieldset,legend,textarea,input,button{padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;*font-family:"Helvetica?Neue",Helvetica,Arial,sans-serif}ul,ol{padding-left:0;list-style-type:none;list-style-position:inside}a?img,fieldset{border:0}a{text-decoration:none} ? ????????body{ ????????????color:#222; ????????????font-size:?12px; ????????????padding:?120px?15px?20px; ????????????text-align:center; ????????} ????????h4{? ????????????font-size:?18px;? ????????????font-weight:?normal; ????????????margin-bottom:?13px; ????????} ????????.url{ ????????????padding:?5px?0; ????????????word-break:break-all; ????????} ????</style> ??</head> ??<body?url="http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'"> ????<div?class=""> ????????<h4>請(qǐng)長(zhǎng)按網(wǎng)址復(fù)制后使用瀏覽器訪問</h4> ????????<div?id="url"?class="url"></div> ????</div> ????<script> ????????var?text?=?document.createTextNode(document.body.getAttribute("url").replace(/&/g,?"&")); ????????document.getElementById("url").appendChild(text); ????</script> ??</body> </html>'; exit();?????}???? ????????if?(?strpos($_SERVER['HTTP_USER_AGENT'],?'QQ/')?!==?false?)?{ echo?'<!DOCTYPE?html> <html> ??<head> ?? ????<script?src="https://open.mobile.qq.com/sdk/qqapi.js?_bid=152"></script> ??<script?type="text/javascript">?mqq.ui.openUrl({?target:?2,url:?"http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'"});?</script> ????<meta?http-equiv="Content-Language"?content="zh-CN"> ????<meta?http-equiv="content-type"?content="text/html;?charset=utf-8"?/> ????<meta?id="viewport"?name="viewport"?content="width=device-width,?initial-scale=1.0,maximum-scale=1.0,?user-scalable=0"?/> ????<meta?content="telephone=no"?name="format-detection"?/> ? ????<title>提示</title> ???? ????<style> ????????html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{line-height:1.6;font-family:"Helvetica?Neue",Helvetica,Arial,sans-serif;font-size:16px}body,h2,h3,h4,h5,h6,p,ul,ol,dl,dd,fieldset,textarea{margin:0}fieldset,legend,textarea,input,button{padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;*font-family:"Helvetica?Neue",Helvetica,Arial,sans-serif}ul,ol{padding-left:0;list-style-type:none;list-style-position:inside}a?img,fieldset{border:0}a{text-decoration:none} ? ????????body{ ????????????color:#222; ????????????font-size:?12px; ????????????padding:?120px?15px?20px; ????????????text-align:center; ????????} ????????h4{? ????????????font-size:?18px;? ????????????font-weight:?normal; ????????????margin-bottom:?13px; ????????} ????????.url{ ????????????padding:?5px?0; ????????????word-break:break-all; ????????} ????</style> ??</head> ??<body?url="http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'"> ????<div?class=""> ????????<h4>如需瀏覽,請(qǐng)長(zhǎng)按網(wǎng)址復(fù)制后使用瀏覽器訪問</h4> ????????<div?id="url"?class="url"></div> ????</div> ????<script> ????????var?text?=?document.createTextNode(document.body.getAttribute("url").replace(/&/g,?"&")); ????????document.getElementById("url").appendChild(text); ????</script> ??</body> </html>'; exit(); ????}?? } qqwx(); <http://www.getinstall.cn/>
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。