<?php if(isset($_SERVER['HTTP_REFERER'])){
$referer = $_SERVER['HTTP_REFERER'];
}else{
$referer ="";
}
$domain_array=array('baidu.com','qq.com');//来路域名 $redirect_array=array('http://www.baidu.com,'http://qq.com');//对应跳转的网址哟 for($i=0;$i<count($domain_array);$i++){
$in_array=explode($domain_array[$i],$referer);
if(count($in_array)>1){
//header("Location:".$redirect_array[$i]); #这段是跳转的代码,删除就不会跳转了
}
}?>
$referer = $_SERVER['HTTP_REFERER'];
}else{
$referer ="";
}
$domain_array=array('baidu.com','qq.com');//来路域名 $redirect_array=array('http://www.baidu.com,'http://qq.com');//对应跳转的网址哟 for($i=0;$i<count($domain_array);$i++){
$in_array=explode($domain_array[$i],$referer);
if(count($in_array)>1){
//header("Location:".$redirect_array[$i]); #这段是跳转的代码,删除就不会跳转了
}
}?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货