I only need to detect if is mobile device or not...
Asked
Active
Viewed 2,732 times
2
-
possible duplicate of [PHP mobile browser detection?](http://stackoverflow.com/questions/3817155/php-mobile-browser-detection) – Gordon Nov 17 '10 at 23:18
-
hi... when i inserted the answer the stackoverflow ajax autosuggest didnt show me that question... – Alejandro Nov 17 '10 at 23:26
3 Answers
5
This is a good class to try:

wajiw
- 12,239
- 17
- 54
- 73
-
-
hi thanks a lot im getting this error: Notice: Undefined variable: accept in C:\Servidor_Apache\htdocs\INTERSOLUCIONESCR\Descuenticos\ver3\mobile\Mobile_Detect.php on line 40 Notice: Undefined property: Mobile_Detect::$isIphone in C:\Servidor_Apache\htdocs\INTERSOLUCIONESCR\Descuenticos\ver3\mobile\Mobile_Detect.php on line 80 when in invoke the function isMobile() What that means???? – Alejandro Nov 17 '10 at 23:37
-
It's a known bug: http://code.google.com/p/php-mobile-detect/issues/detail?id=7 In the ticket it shows how to fix it. – wajiw Nov 17 '10 at 23:39
1
You might want to try something like this if you want to know which device it is: http://www.hand-interactive.com/resources/detect-mobile-php.htm
Or if you don't care: http://mobiforge.com/developing/story/lightweight-device-detection-php

Andrew M
- 4,208
- 11
- 42
- 67