direct.php

来自「wap 程序 手器电脑通用」· PHP 代码 · 共 54 行

PHP
54
字号
<?
/** 
*
* @package wappyCULT: wap community script
* @version 1.00 2006/09/12 21:53:27 wappy
* @copyright (c) 2004-2006 wappyCULT 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/

/**
*/
//wappyREDIRECTION v1.00

// Based on code by Brad Derstine -- www.bizzarscripts.net

//updated by wappy of wappyCULT: cult.trap17.com

// Your web page
$htmlredirect = "web.html";

// Get browser ID
$browser=substr(trim($HTTP_USER_AGENT),0,4);

// Identify Web Browsers
 if($browser=="Mozi" OR $browser=="msie" OR $browser=="omni" OR $browser=="konq" OR $browser=="lynx" OR $browser=="elin" OR $browser=="link" OR $browser=="w3m" OR $browser=="webt" OR $browser=="amay" OR $browser=="dill" OR $browser=="ibro" OR $browser=="icab" OR $browser=="craz" OR $browser=="inte")

    {
// Identify the above as Web Browsers
        $br = "HTML";

// Opera and Opera Mobile bypass system, this is new and probably needs updating with more details. To test a browser visit debugger.php with that browser please email any updates to admin@cult.trap17.com thanks
$browserfull=explode ('; ', $HTTP_USER_AGENT);
$data0=explode(' ', $browserfull[0]);
$data3=explode('/', $browserfull[3]);
$data3=explode(' ', $data3[0]);
$data4=explode(' ', $browserfull[4]);

// This is where you might need to add new values if some browsers intended for web and wap or the browsers you still want to get through the filter. Remember use debugger.php
if($browserfull[2]=="Symbian OS" OR $data3[0]=="Nokia" OR $data4[1]=="Opera"){$br = "WML";}

    }
    else 
    {
// Identify balance as Wap Devices/Emulators
        $br = "WML";
    }

if($br == "HTML") {
    header("Location: ".$htmlredirect);
    exit;
    }
    
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?