Page 1 of 1

http referer

Posted: Tue Oct 09, 2007 7:50 pm
by davelr459
I am trying to use the http referer variable from a secure page with php 4.4 , is this possible? I cant seem to get it to work...

Is there an alternative to http referer? I just need to know what url the user was on before coming to the web page. Thanks

Re: http referer

Posted: Tue Oct 09, 2007 8:10 pm
by Zoxive
davelr459 wrote:I am trying to use the http referer variable from a secure page with php 4.4 , is this possible? I cant seem to get it to work...

Is there an alternative to http referer? I just need to know what url the user was on before coming to the web page. Thanks
Store it as a Session, or maybe even a Get Variable.

Posted: Wed Oct 10, 2007 9:59 am
by pickle
$_SERVER['HTTP_REFERER'] is not guaranteed to be set. NEVER rely on that being set. Sessions are probably your best bet.

Posted: Wed Oct 10, 2007 1:31 pm
by s.dot
If the end user is coming from a remote web site, then HTTP_REFERER may or may not be set, and may or may not be accurate.

It's a good tool, for guessing with some accuracy.

If you're doing this all in the same local web site, storing the URI/path info/query strings etc in a session variable would be perfect.