in reply to Checking Referring Page?

Hi Spidy,

If you check the $ENV{HTTP_REFERER} you can see where the requests are coming from.

Hope this helps.

Martin

Replies are listed 'Best First'.
Re^2: Checking Referring Page?
by ikegami (Patriarch) on Dec 07, 2005 at 17:41 UTC
    No good. The referrer can be faked as easily as the hidden fields.
Re^2: Checking Referring Page?
by phaylon (Curate) on Dec 07, 2005 at 17:52 UTC
    The Referer is completely client-dependant in if it's sent, what it sends etc. You shouldn't trust user input if you have to be sure of something.

    edit: Woops, this should've been an answer to marto.

    Ordinary morality is for ordinary people. -- Aleister Crowley

    Reparented from Checking Referring Page? by Arunbear

Re^2: Checking Referring Page?
by Spidy (Chaplain) on Dec 07, 2005 at 17:31 UTC
    Apparently my server doesn't do $ENV{HTTP_REFERER}...can't seem to find it in my %ENV test, anyways.

      Don't forget there is no referrer if you're loading a page directly. You have to have clicked through something. Try putting a dummy link to stay in your CGI and see.

      use CGI qw(:standard); print header(), start_html(); # <-- update to run/test w/o changes print a({-href=>url(1)}, "self-check: ", referer() || 'no referrer');