I have a PHP script that checks the HTTP Referer.
if ($_SERVER['HTTP_REFERER'] == 'http://www.example.com/') {...}
However, this seems inherintly unsafe ... because what happens if the user goes to 'http://example.com/'
or 'http://www.ExaMple.com'
(both of which don't match the equality test).
Question: what's a better equality test to ensure that the HTTP Referer is coming from 'example.com'
?