I want to know is there any option/work sround for $_SERVER[‘HTTP_REFERER’]. Because ‘HTTP_REFERER’ can not be trusted.
Then What is other way to know that from which url the request has came from?.
Here is the situation –
http:// abc.com/one.htmlwill have an iframe having src=http:// xyz.com/giv.php?param=1.
How giv.php on xyz.com will know that request is coming from http:// abc.com/one.html?
This looks like it might be an X-Y problem.
If X is
Then the referer is “good enough”.
For the referer to be forged, the user has to participate. The unauthorised website can’t tell the user’s browser to send a false referer.