note 44942 deleted from function.header by tomsommer
| From: | tomsommer@php.net | Date: | Fri, 20 Aug 2004 21:25:27 +0000 |
| Subject: | note 44942 deleted from function.header by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75030@lists.php.net to get a copy of this message | ||
Note Submitter: spam dot havard at hvassing dot com
----
A short comment to what isaac at blueapples dot org wrote.
My image script wasn't cooperative at all when I used this code:
<?php
header("Content-Type: " . $image_type . "");
?>
When I altered it to the following:
<?php
header("Content-type: " . $image_type . "");
?>
everything worked out just fine.
Although the best code for this might be:
<?php
$agent = trim($_SERVER['HTTP_USER_AGENT']);
if ((preg_match('|MSIE ([0-9.]+)|', $agent, $version)) || (preg_match('|Internet
Explorer/([0-9.]+)|', $agent, $version)))
{
header("Content-type: " . $image_type . "");
}
else
{
Header("Content-Type: " . $image_type . "");
}
?>
I use Windows XP Pro SP2
and Internet Explorer (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1))