I have a requirement to know the referrer URL and i am using $_SERVER['HTTP_REFERER'] it works fine for the websites which is referring to my site but it is not showing any url when the link has been clicked from any email inbox.
I have a requirement to know the referrer URL and i am using $_SERVER[‘HTTP_REFERER’]
Share
The short answer is that you can’t do this with HTTP_REFERER. Email clients, or anyone else for matter, are not obliged to provide this header with a request.
From php.net:
As noted in the comments, you would have to embed tracking information in the link that the user clicks if it is within your control to do so.