function check_url(){ $str=@$_SERVER['HTTP_REFERER'];//@为除错功能 if(strstr($str,www.smsyun.com)){ echo "来自 www.smsyun.com"; }else{ echo "其它网址"; } }