Получить последнюю посещенную страницу
Мне нужно знать, не пришел ли человек, который зашел на мой сайт, с другого конкретного сайта. Пример:
User A visits www.youtube.com/myvideo and clicks on a link to my website. User B visits google, search my website and click the link.Сообщение о результатах на моей странице:
User A:Welcome! You already know how it works, register now!
User B: Welcome! Please watch our video first at www.youtube.com/myvideo
Мой вопрос:
Is it possible to know the last url the user visited before entering my page?I already tried
$_SERVER['HTTP_REFERER']
with PHP, but it's not working correctly and I read that does not work on all browsers.
Is there any language or php script to get this url, working on all browser correctly?