Determine client OS in PHP

前端 未结 2 1621
生来不讨喜
生来不讨喜 2021-01-14 16:30

I have two pages redirection in my index.php. The pages are example_system_os.php and example_mobile_os.php.

How to determine the user\'s o

2条回答
  •  天涯浪人
    2021-01-14 16:46

    You could parse the $_SERVER['HTTP_USER_AGENT'] string for the various platform details, but I wouldn't be confident that this was a deterministic approach, since it can easily be faked.

提交回复
热议问题