Hi,
I'm fairly new to PHP and was wondering what the best way (or if there even is one?) to limit the access to a specific page depending on the page that the person has come from? I've tried using the $HTTP_REFERER variable but have read that this is unreliable as it can be spoofed and that many browsers and firewalls bl;ock this information from being sent.
Any help would be appreciated greatly!
Limiting access to a specific page
Moderator: General Moderators
-
sunilbhatia79
- Forum Newbie
- Posts: 24
- Joined: Sun Nov 11, 2007 9:37 pm
- Location: Mumbai, India
A secure way would be to store his current visit in a single record in a database and keep updating it as and when he visits different pages... update the same record - dont insert new records for each page (unless you want to capture clickstream)...
Then on the page where you want to check his previous page, you can refer to the table where is old page that he visited is stored.
Hope this helps
Then on the page where you want to check his previous page, you can refer to the table where is old page that he visited is stored.
Hope this helps
-
sunilbhatia79
- Forum Newbie
- Posts: 24
- Joined: Sun Nov 11, 2007 9:37 pm
- Location: Mumbai, India
A secure way would be to store his current visit in a single record in a database and keep updating it as and when he visits different pages... update the same record - dont insert new records for each page (unless you want to capture clickstream)...
Then on the page where you want to check his previous page, you can refer to the table where is old page that he visited is stored.
Hope this helps
Then on the page where you want to check his previous page, you can refer to the table where is old page that he visited is stored.
Hope this helps
Thanks for the suggestions but unfortunately the visitors are coming from another site on a different server so I don't think I can use the methods you've suggested.
This was why I was looking at using the $_HTTP[REFERER] variable so i would supply me with an URL i could then match up to allow access.
Any other suggestions?
This was why I was looking at using the $_HTTP[REFERER] variable so i would supply me with an URL i could then match up to allow access.
Any other suggestions?
-
sunilbhatia79
- Forum Newbie
- Posts: 24
- Joined: Sun Nov 11, 2007 9:37 pm
- Location: Mumbai, India