mcmuney Posted August 8, 2006 Share Posted August 8, 2006 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??? Link to comment https://forums.phpfreaks.com/topic/16927-redirection-script-for-mobilehandhel-visits-to-your-website/ Share on other sites More sharing options...
radalin Posted August 9, 2006 Share Posted August 9, 2006 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:[CODE]if ($_SERVER['HTTP_USER_AGENT'] == "Mobile") header("Location:http://mobile.aol.com");[/CODE]I'm not quite sure if that if statement will work but it should be something like that. You could try strpos() function too. Link to comment https://forums.phpfreaks.com/topic/16927-redirection-script-for-mobilehandhel-visits-to-your-website/#findComment-71661 Share on other sites More sharing options...
mcmuney Posted August 9, 2006 Author Share Posted August 9, 2006 Tried your suggestions, but didn't work. Link to comment https://forums.phpfreaks.com/topic/16927-redirection-script-for-mobilehandhel-visits-to-your-website/#findComment-71955 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.