Re: Browser detection script (css)
| From: | �ystein H�land | Date: | Thu, 05 Jun 2003 15:20:21 +0000 |
| Subject: | Re: Browser detection script (css) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150369@lists.php.net to get a copy of this message | ||
Maybe this could do the job as well. Thanks
"Emo" <emo@emo-cz.net> skrev i meddelandet
news:20030604204148.54666.qmail@pb1.pair.com...
> I don't know if you mean this ...
> I use for detect browser and send css for it this script:
>
> <?php
> // set default css file (MSIE)
> $css='main.css';
> // if browser is opera ...
> if (substr_count($_SERVER["HTTP_USER_AGENT"], 'Opera'))
> {
> // ... set opera css
> $css='main.opera.css';
> }
> // if browser is gecko-based (mozilla, etc...)
> elseif (substr_count($_SERVER["HTTP_USER_AGENT"], 'Gecko'))
> {
> // ... set gecko css
> $css='main.gecko.css';
> }
> ?>
> <html>
> <head>
> <title> Some title </title>
> <link rel=StyleSheet href="<? echo $css; ?>" type="text/css">
> <meta http-equiv="content-type" content="text/html;
charset=windows-1250">
> </head>
> <body>
> .....
> .....
> .....
> "ØYstein HåLand" <ha@ematte.se> pí¹e v diskusním pøíspìvku
> news:20030604191122.15142.qmail@pb1.pair.com...
> > Till now I've bin using the BrowserDetect.class.php by Harry Fuecks.
Since
> I
> > migrated to register_globals=off this produses a lot of error messages.
> Has
> > anyone a modification that work or another script doing the same?
> >
> >
>
>