Re: Detect and Redirect Mobile Users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 13, 2013, at 15:31, Camille Hodoul <camille.hodoul@xxxxxxxxx> wrote:

> Hello,
> 
> I stumbled upon this the other day :
> http://mobiledetect.net/
> I haven't tried it yet, since I have my own small user agent parser when I
> need it, but it may help you if it's a pure php solution you're looking for.
> 
> Have a nice day
> 
> 
> 2013/6/13 dealTek <dealtek@xxxxxxxxx>
> 
>> Hi all,
>> 
>> I'm curious of a simple, common, universal way to detect a mobile user so
>> I can redirect them to a mobile directory...
>> 
>> What is best for this: Javascript - CSS - PHP?
>> 
>> I think for my purposes if I can detect screen size or mobile browser
>> agent - that would be good enough for what I need right now.
>> 
>> Thanks in advance - Dave
>> 
>> 
>> --
>> Thanks,
>> Dave - DealTek
>> dealtek@xxxxxxxxx
>> [db-3]
>> 
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 
> 
> 
> -- 
> Camille Hodoul
> http://camille-hodoul.com/

Some time ago, I tested php-mobile-detect and detectmobilebrowsers.com, taking the (old) wurfl database (as a reference with a bit less than 15.000 mobile devices). Tests came out as follows:

php-mobile-detect: 7 seconds in 15.000 devices, 70% accuracy
detectmobilebrowsers.com: 0.6 seconds in 15.000 devices, 93,5% accuracy

The post I made is in spanish, but could serve as a reference:
http://blog.unreal4u.com/2012/10/detectar-facilmente-un-dispositivo-movil/

As for the OP, I think that the best way would be PHP, because you can do a lot more, like not even redirecting the user but rather just load the mobile site directly, setting a session value if desktop version is forced or not. This way, any links would also be interchangeable, making it easier for you to implement specific functionality such as "send link through email" and other related things.

Greetings.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux