Nagy
Nagy

Reputation: 19

last visited link

I have 2 domain names on second domain name I want to check last visited link.

for eg. on 1st domain name contact us link is given when user click on it, it takes him to second domain name. now how will I know which link is clicked.

Upvotes: 0

Views: 767

Answers (2)

James
James

Reputation: 3275

Do you mean you simply want to know which URL people came from? Look at the Referrer header. But be aware this can be easily faked, so do not rely on it for security.

http://en.wikipedia.org/wiki/HTTP_referrer

Upvotes: 0

Fanis Hatzidakis
Fanis Hatzidakis

Reputation: 5340

You can check the HTTP REFERER header. In PHP you can find it in $_SERVER['HTTP_REFERER'] but as it is set by the user agent (the browser), you cannot really trust it for anything important.

http://www.php.net/manual/en/reserved.variables.server.php

Upvotes: 1

Related Questions