Great question — answering as the UphillTech team:
<?php echo $_SERVER['HTTP_REFERER']; ?> This tiny php script enables you to know from where the user came from. EDITS As nyshangal asked for jsp code JSP request.getHeader("Referer"); I am not good at JSP. After googling I found that this above code will return the referrer from where the user came from. Thank you
Full answer by Katti: https://stackoverflow.stackexchange.com/a/10823946 (CC BY-SA 3.0).
Need it done for your business? UphillTech.