PHP完全自学手册(珍藏版) 中文pdf扫描版下载
$geturl = "http://www.kuitao8.com/20140924/3096.shtml";
if(isset($geturl)&&!empty($geturl)){
$fromHost = array(
'kuitao8.com'
);
$urlArr = parse_url($geturl);
$host = isset($urlArr['host'])?$urlArr['host']:'';
$host = strtolower(str_ireplace('www.','',$host));
if(!in_array($host,$fromHost)){
echo "禁止访问";
} else {
echo "正常访问";
}
}
转载请注明:谷谷点程序 » php给用域名授权访问的实现方法