Page 1 of 1

Return the URL a form was submitted from?

Posted: Thu Oct 26, 2006 10:11 pm
by jrucifer
Is there any way in PHP, or any other scripting for that matter, to return the URL from which a form is being submitted from? Any kind of a preset $_POST variable perhaps?

Mainly, I just want to see if anyone attempts to submit data from an unwanted URL.

I have front-end and back-end verification, so I'm not worried about that, more so just for my own knowledge.

Posted: Thu Oct 26, 2006 10:20 pm
by nickvd
$_SERVER['HTTP_REFERER'] -- though it is supplied by the browser, and therefore cant be trusted...

Posted: Thu Oct 26, 2006 10:48 pm
by s.dot
$_SERVER['REMOTE_ADDR']

which also warrants the limits mentioned above