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? Quote Link to comment Share on other sites More sharing options...
trq Posted September 4, 2013 Share Posted September 4, 2013 None. Quote Link to comment 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/ Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.