2009. 11. 4. 15:09
리퍼러체크해서 주소치고 들어오는 소스보기 막기 PHP2009. 11. 4. 15:09
원래는 파일 다운시 외부링크차단용인데 대충 가져다 쓴다.
$download_ok = '';
$Goes = $_SERVER["HTTP_REFERER"];
if($Goes){
$basewords = "http://cyber74.textcube.com";//검사할 문자열
if(substr($Goes, 0, strlen($basewords)) == $basewords){
$download_ok = "OK";
}else { echo '짜증나서 막았습니다.'; exit; } //그냥 나간다.
}else{ echo '짜증나서 막았습니다.'; exit; }