header() simply sends response headers - I.e adds/replaces server headers - it has no effect on request headers sent by the client.
If, for some reason, you want to alter the user-agent you've received from the client (for testing maybe?) you can do this: echo $_SERVER['HTTP_USER_AGENT']; $_SERVER['HTTP_USER_AGENT']='Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705)'; echo $_SERVER['HTTP_USER_AGENT']; HTH Danny ----- Original Message ----- From: "Taylor York" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 09, 2002 4:54 PM Subject: [PHP] header() > 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); > > //putenv("HTTP_USER_AGENT=$ua"); > > echo "\n<br>user agent: "; > echo getenv("HTTP_USER_AGENT"); > ?> > > Suggestions? > > > > -- > 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