Home > php教程 > php手册 > 根据来路是否为搜索引擎来决定是否跳出弹窗代码

根据来路是否为搜索引擎来决定是否跳出弹窗代码

WBOY
Release: 2016-06-21 09:15:41
Original
1285 people have browsed it

弹窗|搜索引擎

Code:

 $referer = $_SERVER['HTTP_REFERER'];
if(!$referer == ''){
        if(ereg('http',$referer)){
                $referer = @explode('.',$referer);
                if(is_array($referer)){
                        $referer = $referer['1'];
                        if($referer == 'google' OR $referer == 'baidu'){
?>


                        }
                }
        }
}
?>
使用方法:将代码修改后复制插入到所需要的PHP页面里面。
搜索引擎可以自己增加。



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template