Best Open Source WURFL alternative [closed]
Asked Answered
L

6

30

I am looking to do some device detection in PHP and I am looking into a few options. The one that looks the best right now is WURFL http://wurfl.sourceforge.net/. But I am very leery of it because of its non open source license. I am also wondering if it is even relevant because the documentation websites look kind of dated.

Other options like WURFL include http://deviceatlas.com/ and http://51degrees.mobi/ but neither of these are even close to open source.

Then there are the PHP only solutions like http://detectmobilebrowsers.mobi , http://code.google.com/p/php-mobile-detect/ and http://detectmobilebrowsers.com/ but these all use some form of regex that looks ugly.

The ideal solution for me would be an open source XML file or database that I can store locally, and that can be updated as needed.

Am I dreaming? What solution do you prefer for detecting mobile users?

Licking answered 12/3, 2012 at 19:29 Comment(5)
The WURFL entry level license fee is very affordable and the project is very active beside the dated documentation.Elector
51Degrees.mobi has a open source component licenced under the Mozilla Public Licence. See 51degrees.codeplex.comBosky
If the WURFL's AGPL license is not ok for you, you can take a look at the hosted version (WURFL Cloud), which has a free plan. Please note, I am affiliated with ScientiaMobile/WURFL, so I'd encourage you to compare the different options and see which one is the best fit for you! Side note: we agree that the WURFL SourceForge page is in serious need of a makeover - it's on the short list of top priority projects :)Fingerprint
51degrees is a .NET-only solution. The question is about a PHP solution.Auscultation
Apache DeviceMapExperimentation
A
4

Sorry to revive a dead post but there is an Open Source Alternative - OpenDDR - but I can't find PHP libraries for it yet so you will need to code your own parse and search routines.

Agranulocytosis answered 23/6, 2012 at 8:50 Comment(2)
OpenDDR can now be found under openddr.mobi. It's updated and includes everything contributed at Apache DeviceMap.Laster
Disclaimer: @WernerKeil is the dev behind openddr.mobiWaist
P
4

Any reason not to use the ua-parser project?

The PHP client is here: https://github.com/tobie/ua-parser/tree/master/php

Pluralism answered 22/4, 2013 at 11:53 Comment(1)
This project parses UA strings into readable forms, it doesn't actually do any 'Device Capability Detection' at all.Raposa
G
3

I use a script based on the work at http://detectmobilebrowsers.com/. It boils down to a regular expression, which is supported in pretty much any language, not just PHP. As regex's go, it's not even terribly ugly: the main one is only a few lines long, and would be extremely quick to parse in most languages/frameworks. Being a regex, it's totally transparent, and doesn't require you to install some librarly, DLL, or DB/file-based repository.

The author, Chad Smith, uses the WURFL database to compile a stripped-down, minimalist Regex to detect only mobile browsers. Tablets are excluded on the assumption that they will usually work well with the desktop version of a page. He seems to update it once a year, or at least whenever a new major mobile browser comes out (which is not very often.)

Gilli answered 25/10, 2013 at 21:42 Comment(0)
E
2

It's easy to add Tablet browser detect to Chad Smith's regex's, and it seems to work well. See the about section:

http://detectmobilebrowsers.com/about

Ensnare answered 27/2, 2014 at 9:29 Comment(0)
D
1

I use MobileESP which is not as advanced as WURFL, but does the trick for my needs. There is no separate database in MobileESP that you can upgrade, you have to upgrade the whole library.

Dowitcher answered 30/3, 2012 at 10:44 Comment(0)
B
0

If you only need device categorisation - e.g. mobile, desktop or tablet - then Categorizr is probably the best option. It takes a mobile first approach as it is easier to identify the small and relatively stable population of desktop browsers than the vast number of mobile and other browsers.

Blatant answered 3/12, 2012 at 15:21 Comment(1)
Categorizer is no longer supportedDorothadorothea

© 2022 - 2024 — McMap. All rights reserved.