有谁知道PHP5.3怎么弄文字盗链

来源:百度知道 编辑:UC知道 时间:2024/05/24 13:10:15
就是弄好后不能复制文字内容

1.简单防盗链

$ADMIN[defaulturl] = "http://siyizhu.com/404.htm";//盗链返回的地址
$okaysites = array("http://siyizhu.com/","http://www.siyizhu.com"); //白名单
$ADMIN[url_1] = "http://siyizhu.com/temp/download/";//下载地点1
$ADMIN[url_2] = "";//下载地点2,以此类推

$reffer = $HTTP_REFERER;
if($reffer) {
$yes = 0;
while(list($domain, $subarray) = each($okaysites)) {
if (ereg($subarray,"$reffer")) {
$yes = 1;
}
}
$theu = "url"."_"."$site";
if ($ADMIN[$theu] AND $yes == 1) {
header("Location: $ADMIN[$theu]/$file");
} else {