droidus Posted July 19, 2011 Share Posted July 19, 2011 how would i detect if someone is using a phone, and redirect them? Link to comment https://forums.phpfreaks.com/topic/242297-phone-detection/ Share on other sites More sharing options...
btherl Posted July 19, 2011 Share Posted July 19, 2011 You can use the value in $_SERVER['HTTP_USER_AGENT']. And google for "mobile user agent detection" Link to comment https://forums.phpfreaks.com/topic/242297-phone-detection/#findComment-1244397 Share on other sites More sharing options...
dcro2 Posted July 19, 2011 Share Posted July 19, 2011 But PLEASE offer an option to view the full site if you're going to force a mobile view on somebody when they first go into your site. Link to comment https://forums.phpfreaks.com/topic/242297-phone-detection/#findComment-1244400 Share on other sites More sharing options...
droidus Posted July 19, 2011 Author Share Posted July 19, 2011 hm, this didn't work: http://detectmobilebrowser.com/... i tried php, and i used a droid phone, with dolphin browser hd. Link to comment https://forums.phpfreaks.com/topic/242297-phone-detection/#findComment-1244404 Share on other sites More sharing options...
dcro2 Posted July 19, 2011 Share Posted July 19, 2011 User agents aren't an exact science, they can be spoofed and there's so many it's very hard to be 100% right. I'm not sure what user agent that browser has, but the code from that page doesn't seem to mention Dolphin so it's probably not set to detect it. Link to comment https://forums.phpfreaks.com/topic/242297-phone-detection/#findComment-1244414 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.