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 operating system in PHP?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
get_browserfunction can be used to extract a couple of information theUser-AgentHTTP header sent by the browser.Amongst those informations, it seems there is some data about the operating system the browser’s running on — i.e. about the client OS.
Quoting the example given on the manual page of
get_browser:But note that the User-Agent HTTP header is sent by the client, which means :