I need a webpage to display if its being viewed on a PC/Mac, iphone, etc and also what browser its being run on. Anyone know how I would go about doing that?
Share
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.
You typically get this information through the
User-agent:HTTP header sent by your browser. If you were using PHP, you’d get this by reading$_SERVER['HTTP_USER_AGENT']. PHP also has a higher level[get_browser][1]API to read this data.If you’re using another scripting language in your web app, you’ll need to look up the equivalent.