13 lines
284 B
PHP
13 lines
284 B
PHP
<?php
|
|
|
|
function checkReferrer(){
|
|
if( isset($_SERVER['HTTP_REFERER']) ){
|
|
$ref = str_replace('http', '', $_SERVER['HTTP_REFERER']);
|
|
$ref = str_replace(':', '', $ref);
|
|
$ref = str_replace('/', '', $ref);
|
|
return ( $ref == $_SERVER['SERVER_ADDR'] );
|
|
}else{
|
|
return false;
|
|
}
|
|
}
|
|
?>
|