<?php if(!$_SERVER['HTTP_REFERER']){ echo '<a href="'.$_SERVER['REQUEST_URI'].'">XX.com Hoşgeldiniz<br>Giriş için tıklayınız.</a>'; exit(); ?>