Lethe Posted April 8, 2009 Share Posted April 8, 2009 When I first run my php script I need to identify my script to others by modifying some sent header information as below... ini_set('user_agent', 'somename'); header('From: myemail@someaddress.com'); flush(); I can confirm that ini_set is working by: echo ini_get('user_agent'); I can then check - in the same script - my headers using either: foreach (getallheaders() as $name => $value) { echo "$name: $value<br />"; } or var_dump($_SERVER); But neither of these show the changed headers. All the headers are still the same. What am I doing wrong? Quote Link to comment Share on other sites More sharing options...
Lethe Posted April 8, 2009 Author Share Posted April 8, 2009 opp hang-on I just saw the HEADER ERRORS - READ HERE BEFORE POSTING THEM pinned post... I'm reading it now! Quote Link to comment Share on other sites More sharing options...
Lethe Posted April 8, 2009 Author Share Posted April 8, 2009 Ummm, nope still nothing. I've already done everything mentioned in the post. To confirm I try to change the headers before any html is outputted and there are no characters before or after the php tags. I've tried all the suggestions mentioned here http://ca.php.net/manual/en/function.flush.php The header information returned is: Host: localhost:8888 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cache-Control: max-age=0 Any suggestions? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.