1. Computing

Discuss in my forum

Angela Bradley

PHP Knows You're On A Mac

By , About.com GuideJuly 31, 2006

Follow me on:

When I go to some software sites I am taken directly to the page for Macintosh software, while my friend visiting the same page is taken to the Windows software. How did the website know that I'm on a Mac? Well one simple way that a PHP site can gather this information is by using ['HTTP_USER_AGENT']. Once it has this information, it can sort users accordingly.
Comments
No comments yet. Leave a Comment
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2013 About.com. All rights reserved.