Cod PHP:
if(eregi("refer.php",$_SERVER[HTTP_REFERER])) { ceva };