How do I set HTTP_FORWARDED & HTTP_VIA variables?

Discussion in 'PHP' started by Jeebe, May 13, 2006.

  1. #1
    How do I change the environmental variables HTTP_VIA & HTTP_FORWARDED?
    is there some kind of setenv function? can this be done without apache?
     
    Jeebe, May 13, 2006 IP
  2. Jeebe

    Jeebe Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I've tried things such as using ENV etc. but it doesn't seem to work, maybe I need a whole different approach?
     
    Jeebe, May 15, 2006 IP
  3. Dan Grossman

    Dan Grossman Peon

    Messages:
    177
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    $_SERVER['HTTP_VIA'] and $_SERVER['HTTP_FORWARDED'] are sent by the web browser to your server as headers when making the request for a webpage.

    If you're trying to connect to another web server to make a post or request a webpage, and want to SEND HTTP_VIA or HTTP_FORWARDED headers, then how you do that depends on how you're making the connection -- by sockets, or with the cURL extension, or by executing cURL at the command line with exec(), etc.
     
    Dan Grossman, May 23, 2006 IP