unicode & os detection
Moderator: General Moderators
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
unicode & os detection
is os detection reliable? there are a couple of unicode characters i would like to use on my website. they work great on linux systems and are available on windows through the wing and web dings fonts. i found some pretty fonts that i could probably include using css but i would like to avoid that feature if possible. im not sure how reliable os detection is though. in the tests i have done i haven't been able to produce results that were unreliable but thats just my system who knows. and just fmi what about uncommon operating systems like ibm ones?
Re: unicode & os detection
A very simple OS detection would be like
That's the answer to your question.
The answer to your problem is more along the lines of using images instead of characters or strings.
Code: Select all
if (empty($_SERVER["HTTP_USER_AGENT"])) {
// can't know
} else if (stripos($_SERVER["HTTP_USER_AGENT"], "Win")) {
// probably windows
} else if (stripos($_SERVER["HTTP_USER_AGENT"], "Linux") || stripos($_SERVER["HTTP_USER_AGENT"], "Unix")) {
// probably 'nix
} else if (stripos($_SERVER["HTTP_USER_AGENT"], "Mac")) {
// probably mac
} else {
// don't know - spider?
}The answer to your problem is more along the lines of using images instead of characters or strings.
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Re: unicode & os detection
images are a lot less fun. and i understand how to code it i just dont know how reliable it is. i know that browser detection can be icky sometimes so i figured the same may apply to this.