Re: browser detection
| From: | Philip Olson | Date: | Wed, 26 Sep 2001 03:08:53 +0000 |
| Subject: | Re: browser detection | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-68802@lists.php.net to get a copy of this message | ||
Check out the following :
Browser Detection and Appropriate CSS Generation :
-----------------------------------------------------
http://www.phpbuilder.com/columns/tim20000821.php3
phpSniff :
-----------------------------------------------------
http://www.sourceforge.net/projects/phpsniff/
And as already stated, the predefined variable $HTTP_USER_AGENT is what
makes all this happen. Predefined variables are good :
http://www.php.net/manual/en/language.variables.predefined.php
That phpbuilder article will probably be of most use to you, it contains
examples to do about anything with $HTTP_USER_AGENT.
Also, check out the get_browser() function :
http://www.php.net/manual/en/function.get-browser.php
Although it takes a little work to get running :)
Regards,
Philip Olson
On Tue, 25 Sep 2001, wm wrote:
> hi all,
>
> anybody know the function for browser detection?
>
> what i want to do is set a variable $spacerheight to a value dependent
> upon whether the user is on a mac or a pc.
>
> then i can say height=<? echo "$spacerheight"; ?> in the html.
>
> i tried using javascript a few diff ways with this and it didn't work.
>
> so, if anybody knows that function or if there is another way, please
> let
> me know.
>
> thanks.
>
>
> --
> 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
>