Reputation: 669
I want to know that whether on a php page we can get browser history? Suppose I want to display a php page if a specific link on that browser has been visited earlier otherwise a blank page is to be displayed. Is it possible to do so??
Upvotes: 0
Views: 8166
Reputation: 17868
As it is your own site, you can store a session variable to confirm they went there, do something like
session_start();
$SESSION["VisitedMySpecialPage"]=time();
and then in the checker page
session_start();
if (isset($SESSION["VisitedMySpecialPage"]))
{
// check here it was within say the last hour..
}
Upvotes: 5
Reputation: 9811
Well, there was workaround to this problem some time ago, I don't know which browser still can do it:
<a>
tag with href attr to link what you are interested on your<a>
node (via JS
), if that link got :visited
pseudo class sendUpvotes: 1
Reputation: 20200
You can track what pages where visited on your own domain, but you can't check what other domains he visited. You can check the referer header to see what site he came from , but that's only 1 site and isn't very reliable.
Upvotes: 1