Jayram121 Posted September 4, 2013 Share Posted September 4, 2013 PHP - $_SERVER['HTTP_ACCEPT'] If I use the above code, which part of the results will determine if it is an android phone or a mobile device? Link to comment https://forums.phpfreaks.com/topic/281843-detect-mobile-devices-php-_serverhttp_accept/ Share on other sites More sharing options...
trq Posted September 4, 2013 Share Posted September 4, 2013 None. Link to comment https://forums.phpfreaks.com/topic/281843-detect-mobile-devices-php-_serverhttp_accept/#findComment-1448099 Share on other sites More sharing options...
fastsol Posted September 4, 2013 Share Posted September 4, 2013 Google has a php class that is used for this http://code.google.com/p/php-mobile-detect/ Link to comment https://forums.phpfreaks.com/topic/281843-detect-mobile-devices-php-_serverhttp_accept/#findComment-1448100 Share on other sites More sharing options...
Jayram121 Posted September 4, 2013 Author Share Posted September 4, 2013 If it is none; then why we use it in the Detect Mobile Devices Link to comment https://forums.phpfreaks.com/topic/281843-detect-mobile-devices-php-_serverhttp_accept/#findComment-1448101 Share on other sites More sharing options...
trq Posted September 4, 2013 Share Posted September 4, 2013 If it is none; then why we use it in the Detect Mobile Devices I'm not sure what that statement means. Link to comment https://forums.phpfreaks.com/topic/281843-detect-mobile-devices-php-_serverhttp_accept/#findComment-1448112 Share on other sites More sharing options...
.josh Posted September 4, 2013 Share Posted September 4, 2013 $_SERVER['HTTP_ACCEPT'] just specifies what type of file types or media the client can/will accept as a response. This isn't really useful for mobile device detection specifically, though indirectly I suppose you could use it for some feature detection, which I guess is indirectly relevant to displaying stuff.. Anyways, normally you would parse $_SERVER['HTTP_USER_AGENT'] to detect the mobile device. Link to comment https://forums.phpfreaks.com/topic/281843-detect-mobile-devices-php-_serverhttp_accept/#findComment-1448132 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.