Linked by Eugenia Loli-Queru on Thu 24th Apr 2008 22:45 UTC
Internet & Networking We were always proud of OSNews' (and Gnomefiles.org's) mobile capabilities. We spent years collecting keywords to be able to automatically redirect or serve a mobile-formatted or WAP-formatted (wap.osnews.com) page to less capable browsers. We believe that this script can recognize 99% of the world's non-desktop browsers. We gave special care to not only phones, but PDAs, gaming devices, text browsers, even weird embedded systems browsers that most users have never heard of. Now, it's time to open source our PHP detection script so others can use it on their sites too. Download here, and read the included readme.txt file too before using. It explains what is what, and what its difference is compared to similar solutions found elsewhere. You can see the work this detection script does in our mobile statistics (OSNews serves about 1500 pageviews per day on non-desktop browsers via this script).
Thread beginning with comment 311388
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Comment by deathshadow
by prickett on Fri 25th Apr 2008 03:03 UTC in reply to "RE: Comment by deathshadow"
prickett
Member since:
2007-04-03

Please show us the code your talking about, because whilst the gesture of offering this work is a great thing, the programming itself is extremely amateurish and we could help you improve and at the end of the day everybody wins.

Edited 2008-04-25 03:04 UTC

Reply Parent Bookmark Score: 1

RE[3]: Comment by deathshadow
by Eugenia on Fri 25th Apr 2008 03:08 in reply to "RE[2]: Comment by deathshadow"
Eugenia Member since:
2005-06-28

I explained what the additional code does. For example, if you hit Nokia Services and opera mini 2.0, you set an additional variable. Then, in your code, you say something like this:
if nokia services version 3.01 and opera mini 2.0, width 95% instead of 100%.
Stuff like that. You simply create special variables to identify some bugs of some versions/browsers and then you code the cHTML in a different way. I have some such code for nokia communicator, links etc.

If you really want to know about all these bugs these browsers have, you will have to experiment yourselves, get devices, emulators etc. I had to do all that.

Edited 2008-04-25 03:09 UTC

Reply Parent Bookmark Score: 1

RE[4]: Comment by deathshadow
by prickett on Fri 25th Apr 2008 03:43 in reply to "RE[3]: Comment by deathshadow"
prickett Member since:
2007-04-03

Thats still not a good way to go about it, hence here is a quick example I slapped together which demonstrates how this can be done better.

http://pastebin.com/f16ca0de5

Reply Parent Bookmark Score: 5