nolageek Posted June 24, 2003 Posted June 24, 2003 I'm actually annoyed and angry right now. lol I've been looking on the net for almost an hour trying to find the code for what is probably very easy to do. I don't know if I'm not searching for the right strings, or if the planets are aligned just so and I'm not allowed to have this information. I'm hoping one of you can help me. Basically, i want to do this: ><?php if (user_agent == "Windows CE" || "Palm OS") { echo "this is the menu for the palmtops"; } else { echo "this is the menu for every one else"; } ?> The closest I've come across is using javascript to redirect to a different page, but that's not what I want to do: ><script> if (navigator.userAgent.indexOf("Windows CE") != -1) {window.location='splash-pc.html'} </script> Helllp! Please! Vincent Quote
KevinW Posted June 24, 2003 Posted June 24, 2003 Don't know .. but this web site has a lot of useful links and info: http://www.cewindows.net/wce/webbrowser.htm -kw Quote
borfast Posted June 24, 2003 Posted June 24, 2003 Have you tried something like this? ><?php $ua = $_SERVER['HTTP_USER_AGENT']; if ( (strpos($ua, "Window CE")) || (strpos($ua, Palm OS")) ) { echo "this is the menu for the palmtops"; } else { echo "this is the menu for every one else"; } ?> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.