You could use output buffering to do the rewriting for you.

IF you use ob_start('my_function'); at the top of your page, where
my_function is the name of a callback function

This function might look like this:

function my_function($buffer)
{
        return $buffer . '?x=foo&y=bar';
}

That's it... well, almost.  There are obviously considerations for doing
this in forms and when urls already contain vars.

If you want, I've got a pre-built class that does exactly what you
want.  Mail me offline.

P.

Maureen Roihl wrote:
> 
> 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
> [EMAIL PROTECTED]
> 
> --
> 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

Reply via email to