Home > Backend Development > PHP Tutorial > Determine whether to pop up the pop-up window code based on whether the source is a search engine_PHP tutorial

Determine whether to pop up the pop-up window code based on whether the source is a search engine_PHP tutorial

WBOY
Release: 2016-07-13 16:54:12
Original
1134 people have browsed it

Code:

$referer = $_SERVER['HTTP_REFERER'];
if(!$referer == ''){
if(ereg('http' . ['1'];< > If ($ Referer == 'Google' or Referer == 'Baidu') {
? & Gt;
& lt; script language = "javascript" & gt;
& lt;- <🎜 <🎜
window.open ('http://123.xia8.com', 'ad', 'height=600, width=800, top=0,left=0,toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, status=yes')
//Write in one line
-->

                                                                                                                                                      .
}
}
?>
Usage: Modify the code, copy and insert it into the required PHP page.
Search engines can be added by themselves.





http://www.bkjia.com/PHPjc/631810.html

www.bkjia.com

truehttp: //www.bkjia.com/PHPjc/631810.htmlTechArticleCode: ?php $referer = $_SERVER['HTTP_REFERER']; if(!$referer == '' ){ if(ereg('http',$referer)){ $referer = @explode('.',$referer); if(is_array($referer)){ $referer = $referer['1'];. ..
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template