RE: [PHP] Environment Variables -- HTTP_REFERER
| From: | Darwin | Date: | Thu, 24 Oct 2002 06:03:32 +0000 |
| Subject: | RE: [PHP] Environment Variables -- HTTP_REFERER | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121207@lists.php.net to get a copy of this message | ||
A database solution will put too much of a burden on my database (even if I
delete older records), and will slow down the scripts a little. Is there a
javascript solution, with the history record of the pages visited, that I
could use with PHP? If so, how would I implement that and make both
languages work together to achieve this goal? Thanks for your earlier
suggestion Peter. I will have to at least give your solution a try to see if
it will hurt the execution speed of the scripts or not.
-Darwin
> -----Original Message-----
> From: Thoenen, Peter Mr. EPS
> [mailto:Peter.Thoenen@bondsteel2.areur.army.mil]
> Sent: Wednesday, October 23, 2002 11:48 PM
> To: 'Darwin'; php-general@lists.php.net
> Subject: RE: [PHP] Environment Variables -- HTTP_REFERER
>
>
> Well an ad hoc method is to immediately start a session when the
> user visits
> a page and then insert the following into a db the following.
>
> 1. SID or session_id()
> 2. current host and page $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']
>
> Evertime they visit a page you update their record w/ the current page, if
> you need the last page, you pull it out of the db before you
> update it. You
> can pull the last page they were at by pulling page out of the db that
> matches their SID (and/or TIMESTAMP if you want). Periodically though you
> will need to run a script and delete old SID's as your db will
> get big fast.
>
> Ad hoc but works.
>
> -Peter
>
> > -----Original Message-----
> > From: Darwin [mailto:superbus22@attbi.com]
> > Sent: Thursday, October 24, 2002 06:34
> > To: php-general@lists.php.net
> > Subject: [PHP] Environment Variables -- HTTP_REFERER
> >
> >
> > Hello,
> >
> > I am running PHP 4.0.6 in a Windows XP environment. I need to
> > know a better
> > and more reliable way to check which page the user came from
> > before the page
> > he/she has currently accessed. I tried to look at
> > HTTP_REFERER, but PHP says
> > it is unreliable. Is there a better way? Here is what PHP has
> > to say about
> > HTTP_REFERER:
> >
> > 'HTTP_REFERER'
> > The address of the page (if any) which referred the user agent to the
> > current page. This is set by the user agent. Not all user
> > agents will set
> > this, and some provide the ability to modify HTTP_REFERER as
> > a feature. In
> > short, it cannot really be trusted.
> >
> > Any help would be greatly appreciated.
> >
> > Darwin
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>