See, i dont get mad. I laugh when things like this happen b/c i find it ammusing.
Ok, here we go.
Im building a function to check the referrer of a page, for form security ..
Yes, im fully aware that their are many other solutions (Captcha, ect) but im just testing some things.
So .. my function code
function check_referrer($path) {
if($_SERVER['HTTP_REFERER'] != "http://www.domain.com" . $path) {
echo $_SERVER['HTTP_REFERER'];
echo "<br />";
echo "http://www.domain.com" . $path;
exit;
}
}
Now, their is some echo's in their for debugging reasons. But, basically i had it to were if the referrers didnt match, it would send them to the homepage.
Ok, so what is the output of that function?
http://www.domain.com/lost/
http://www.domain.com/lost/
"/lost/" being the path entered into the param for the function.
Now, with an exact match, how can this be echoing out the paths?
Someone wanna xplain this to me, thanks.