inserting parameters into URLs dynamically
| From: | Maureen Roihl | Date: | Fri, 14 Mar 2003 21:31:52 +0000 |
| Subject: | inserting parameters into URLs dynamically | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-139764@lists.php.net to get a copy of this message | ||
We are looking for a way to set several key/value pairs (which will differ
across users) such that they will persist during the user's session and
be logged in the weblogs for every request that user makes. Some
potential ways of doing this that occurred to us:
- implement functionality to programmatically append these parameters to
the querystring of all urls displayed across our site (far too cumbersome,
we don't consider this a viable option)
- find a way for PHP to automatically tack the parameters onto the ends
of url querystrings, the same way it can do with PHPSESSIONID (we haven't
found, in our initial research, a way to do this)
Our primary goal is to get these parameters logged in the weblogs, without
having to programmatically/physically modify every link on our site. For
example, if we wanted to track parameters called x and y, the link on the
page would just point to:
/index.php
but the weblog would show something like the following hit:
/index.php?x=foo&y=bar
The parameter values would need to get set once at the beginning of a user's
session, and then would not change over the course of that session (but
they'd need to get tracked with every request they made). We're planning to
implement persistent sessions across our servers as well.
====================================
Maureen Roihl
Senior Web Developer
Smarter Living
mo@smarterliving.com