how to detect internet explorer and firefox using PHP?

前端 未结 6 743
傲寒
傲寒 2021-01-29 09:05

how to detect internet explorer and firefox using PHP?

6条回答
  •  长发绾君心
    2021-01-29 09:15

    you can use $_SERVER['HTTP_USER_AGENT'] as found in the php manual.

    However, be aware that this can be changed by the user and some browsers even provide the ability to do this VERY easy (e.g. Konqueror). A lot of plugins are available to do the same.
    Never ever trust this string.

提交回复
热议问题