Jump to content

Different Menu For Windows Ce Or Palm Users


Recommended Posts

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

Link to comment
Share on other sites

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";
}

?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...