Referral links - how does it work?
1 answer
Yes, it is available referer
. Note that this is an optional field and can be tricked by the client manually or by the client application, as some firewalls and Internet security applications do (Norton Internet Security is known for this). You shouldn't rely on this business logic, but rather only use it for pure statistics.
How to do this depends on the server-side language you are using. In PHP, you can:
$referrer = $_SERVER['HTTP_REFERER'];
In Java / Servlet, you can:
String referrer = request.getHeader("referer");
Note the legendary spelling error in the title field name.
+4
a source to share