[nycphp-talk] using $_SERVER['HTTP_REFERER']
Aaron Fischer
agfische at email.smith.edu
Fri Mar 5 16:33:51 EST 2004
I don't have ownership of the referring page so I can't ask them to set
a session variable. Maybe I could set one on my page that would do the
trick.
I'm thinking I could set it up so that if the session variable exists I
won't let them back in. The only way they will be able to get back in
is to go to the referring page, which is what I want. Does this sound
like I'm on the right track?
Either way, it looks like I may need to delve into the sessions areas
of my php books to learn more!
-Aaron
On Mar 5, 2004, at 4:21 PM, Alan T. Miller wrote:
> I have done something simular where I set a session variable to track
> where
> they initially came from the first time they hit the page. As for
> subsequent
> requests, if the session variable is set, I do not have to worry about
> it.
> Not sure though if this would fit your application though.
>
> Alan
>
>
>
> ----- Original Message -----
> From: "Aaron Fischer" <agfische at email.smith.edu>
> To: "NYPHP Talk" <talk at lists.nyphp.org>
> Sent: Friday, March 05, 2004 2:14 PM
> Subject: [nycphp-talk] using $_SERVER['HTTP_REFERER']
>
>
>> I am working on a page right now that uses HTTP_REFERER to make sure
>> that the user is coming from a specific page. It seems to be working
>> pretty well except for one little hiccup involving the back button:
>>
>> Scenario:
>> The user clicks from the referrer page to my page and is let in OK.
>> When they are done they leave and go somewhere else. However, if they
>> choose to hit the back button they are let into my page again. I
>> would
>> like to know how I can prevent this from happening?
>>
>> I tried playing around with meta tags like content no-cache and things
>> of that sort to prevent the browser from storing in memory but it has
>> not had the desired effect.
>>
>> So I'd be interested in some tips/pointers on how to prevent the back
>> button being able to be used to get back into my page and also
>> suggestions if there is a better way than http_referer to accomplish
>> my
>> goals of restricting access.
>>
>> Thanks,
>>
>> -Aaron
>>
>> _______________________________________________
>> talk mailing list
>> talk at lists.nyphp.org
>> http://lists.nyphp.org/mailman/listinfo/talk
>>
>
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
More information about the talk
mailing list