>I'm trying to change some information in the header...lets say that User
>Agent for example...but it just wont change.
>putenv() will change the User Agent..but nothing else will
>$ua = "Mozilla/4.0 (compatible;)";
>header("User-Agent: $ua\n", TRUE);
>header("Accept: */*", TRUE);
>echo "\n<br>user agent: ";
You are confusing the headers that your web-server sends *TO* the client,
with the headers the server gets *FROM* the user's Browser.
You can't upgrade somebody's stupid IE browser to Mozilla just by sending
them a new User-Agent header, no matter how attractive a solution it might
On each HTTP request, their browser composes a User-Agent setting to tell
you what Browser they are, and you while you can change the value of the
Environment variable that ends up in, it won't change the reality of which
broken browser they are using.
Exactly why did you think you wanted to do this? Because whatever it is
you're trying to do, this for sure is nowhere near the right way to do it.
Each HTTP request and response consists of *TWO* sets of headers -- The
browser *SENDS* some headers to the server, and the server sends back some
headers and (usually) some content.
You can't alter the headers being sent by the browser, though.
Well, okay, you can send Cookies, and they'll come back as headers, and you
can use HTTP Authentication, and on their second page, the browser uses
headers to send back the same username/password they already typed in. But
the actual User-Agent and other stuff the browsers tell you, they make up
all on their own and send in as headers.
Note that geeky users can send any User-Agent they desire...
Like Music? http://l-i-e.com/artists.htm
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php