Return the URL a form was submitted from?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jrucifer
Forum Commoner
Posts: 32
Joined: Fri May 13, 2005 2:36 pm
Location: phoenix

Return the URL a form was submitted from?

Post 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.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

$_SERVER['HTTP_REFERER'] -- though it is supplied by the browser, and therefore cant be trusted...
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

$_SERVER['REMOTE_ADDR']

which also warrants the limits mentioned above
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply