I had been researching in the internet, and now I have still not found a solution. I want to detect people using a mobile phone, either is it iOS, Android or something else. So is there any way to detect all people who are using a mobile phone and entering the website and we could re-direct them to the mobile version of the website?
Asked
Active
Viewed 76 times
-1
-
Downvoters, please state why you downvoted. – A.Haseeb Feb 08 '14 at 09:55
-
I suggest you use an existing solution like [Mobile_Detect class](https://code.google.com/p/php-mobile-detect/) for this purpose. – Amal Murali Feb 08 '14 at 09:55
-
I downvoted because one requirement of this site is to do some basic research. Had you done so you'd have quickly found at least four sites with solutions for Javascript or PHP and a number of questions on [so] on this very topic. – Feb 08 '14 at 09:57
-
This might help - http://mobiledetect.net/ – Kamehameha Feb 08 '14 at 09:57
1 Answers
0
For mobile projects, we use WURFL: http://wurfl.sourceforge.net/
Michael
- 674
- 1
- 7
- 15
-
There's a pretty extensive guide here: [link](http://wurfl.sourceforge.net/php_index.php) - setting it up is probably the "hard" part, using it is very easy. You basically just pass $_SERVER to getDeviceForHttpRequest() and you can check compabilities using getCapability(), eg. getCapability('is_smarttv') returns true or false. This is, as far as I know, the most complete way of dealing with devices. – Michael Feb 08 '14 at 10:16