RE: [PHP] checking for IE or netscape so I can put out the right style sheet
| From: | Jochen Kächelin) | Date: | Tue, 07 Nov 2000 20:19:50 +0000 |
| Subject: | RE: [PHP] checking for IE or netscape so I can put out the right style sheet | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24178@lists.php.net to get a copy of this message | ||
try this:
$browser = getenv("HTTP_USER_AGENT");
echo $browser;
> -----Original Message-----
> From: Jim Carey [mailto:ozbcoz@optushome.com.au]
> Sent: Tuesday, November 07, 2000 9:16 PM
> To: PHP GENERAL LIST
> Subject: [PHP] checking for IE or netscape so I can put out the right
> style sheet
>
>
> I've found that fonts from my page appear smaller on Netscape
> than IE - so I
> would like to test for IE or Netscape and put out the right Link statement
> depending upon which browser - sort of:
>
> if ($browser == "IE)
> {
> echo "<LINK REL=Stylesheet HREF="/css/genIE.css" TYPE="text/css"
> MEDIA=screen>\n";
> }
> else
> {
> echo "<LINK REL=Stylesheet HREF="/css/genNS.css" TYPE="text/css"
> MEDIA=screen>\n";
> }
>
> Anyone tell me how to set $browser depending on the actual
> browser in use ?
>
> Jim Carey
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net