Matthew Brooks <[EMAIL PROTECTED]> said something to this effect on 06/25/2001:
> I have a client that is using frames and in the top frame I need to push a
> customer header and then a section banner based on certain information (Type
> of browser, HTTP_REFERER (sic), pathinfo etc).
> 
> The problem I'm having is that when I call the script banner.pl and set the
> cookie, I'm not getting the right HTTP_REFERER (sic) information because
> it's being called from an html page on the server itself. And the
> HTTP_REFERER (sic) I REALLY need, is the one that tells if the person is
> coming from specific partner sites.
> 
> Anyone have a neat solution to this problem?

Don't use frames. The situation you are seeing is the "correct"
one. The referer for individual frames *is* the enclosing
frameset.

If you must use frames, then a possible solution is to make your
frameset call banner.pl like so:

<frameset>
  <frame src="banner.pl?referer=<!--#echo var="HTTP_REFERER" -->">
  <!-- etc etc etc -->
</frameset>

And set your frameset document to be server-parsed. The variable
interpolation will happen when the frameset document is being
sent, not when the individual frames are being called, which is
what you want. You may have to rewrite banner.pl to look for the
referer param rather than $ENV{'HTTP_REFERER'}, but that should
be pretty trivial.

(This solution assumes Apache, but similar solutions should
probably be possible with other httpds.) 

(darren)

-- 
I am at two with nature.
    -- Woody Allen

Reply via email to