Hello
I have a problem.
How i can write in the page the Operating Systems of the user?
Hello
I have a problem.
How i can write in the page the Operating Systems of the user?
A good question. The OS is contained in the User-Agent header, but isn't always in the same place. You really have to do something like this:Code:$os = "Other"; $ua = strtolower($_SERVER['HTTP_USER_AGENT']); if(strpos($ua, "linux") != -1) $os = "Linux"; if(strpos($ua, "windows") != -1) $os = "Windows"; if(strpos($ua, "apple") != -1) $os = "Mac"; if(strpos($ua, "bsd") != -1) $os = "BSD"; // ...
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Thanks you
Bookmarks