- <?php
- $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'){
- ?>
- <script language="javascript">
- <!--
- 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')
-
- -->
- </script>
- <?php
- }
- }
- }
- }
- ?>
使用方法:将代码修改后复制插入到所需要的PHP页面里面,搜索引擎可以自己增加。