Jump to content


Photo

Redirection Script for Mobile/Handhel Visits to your Website


  • Please log in to reply
2 replies to this topic

#1 mcmuney

mcmuney
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 08 August 2006 - 06:24 PM

Is there a script that will redirect handheld visitors to a different webpage. For example, if you visit aol.com using your mobile, you'll see it redirects you to mobile.aol.com. Anyone have that script???

#2 radalin

radalin
  • Members
  • PipPipPip
  • Advanced Member
  • 179 posts

Posted 09 August 2006 - 08:58 AM

I guess that User agent can be used for that. As the browser you use in your mobile and the browser in your desktops are different. As php you can use something like:
if ($_SERVER['HTTP_USER_AGENT'] == "Mobile")
  header("Location:http://mobile.aol.com");
I'm not quite sure if that if statement will work but it should be something like that. You could try strpos() function too.
Roy Simkes
Yet Another Parkyeri Developer

#3 mcmuney

mcmuney
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 09 August 2006 - 06:42 PM

Tried your suggestions, but didn't work.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users