Code Monkey home page Code Monkey logo

mtco / php-browser-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smxi/php-browser-detection

0.0 2.0 0.0 126 KB

A general php utility for browser detection. Very robust and heavily tested in production environments. Not heavy weight like other php browser detectors, and not inaccurate. Has a companion user agent switcher xml list of browsers user agents.

Home Page: http://techpatterns.com/downloads/php_browser_detection.php

License: GNU General Public License v3.0

PHP 100.00%

php-browser-detection's Introduction

SCRIPT / UTILITY DESCRIPTIONS

These tools/utilities are available at github and on the listed primary pages.

Version Control: https://github.com/smxi/php-browser-detection

============================================================================

PHP Browser Detection

filename: browser_detection.inc

Primary home page: http://techpatterns.com/downloads/php_browser_detection.php
Support forums: http://techpatterns.com/forums/forum-11.html

A general php utility for browser / OS / Mobile / Tablet detection. 
Very robust and heavily tested in production environments. Not heavy weight 
like other php browser detectors, without sacrificing accuracy. 

This is very fast, and very efficient, utility. In continuous use and 
development for almost 15 years.

Returns either string or array data. Full explanation of output options in top
comment header of script.

There are a lot of browser detection scripts out there, some absurdly bloated
and inefficient (all we're doing is parsing the useragent string the server
returns, after all), others too simple, and prone to errors in detection.

============================================================================

PHP Language Detection

filename: language_detection.inc

Primary home page:
http://techpatterns.com/downloads/php_language_detection.php

A lightweight tool to assign browser languages. Based on the $_SERVER["HTTP_ACCEPT_LANGUAGE"]
header. 

Returns an array of the following 4 item array for each language the os supports:
1. full language abbreviation, like en-ca
2. primary language, like en
3. full language string, like English (Canada)
4. primary language string, like English

Easy to use, easy to implement, works well in conjunction with the browser
detection utility.

============================================================================

USERAGENT SWITCHER LIST

filename: useragents.xml

A reasonably complete list of user agents. Primary use is as the default 
full featured useragent list for Chris Pederick's UserAgent Switcher Firefox
addon.

http://chrispederick.com/work/user-agent-switcher/

This list is organized into reasonably easy to navigate sections and 
sub-sections. See below for basic structure.

Very useful to test the browser detection script as well.

This list is updated a few times a year.

Home page/Support Forum: http://techpatterns.com/forums/about304.html

Please note that because Mobile devices have very short lifespans and appear
and disappear constantly, the Mobile useragent section will never be complete.

But it will be generally just fine for testing and debugging purposes.

---------------------------------------------------------------

CONTRIBUTORS

Please note: If you want to contribute any updates to this list, you must
provide the following:

1. The English text version of the useragent, ie, what the end user sees in
the useragent switcher selector.

2. The full, correct, useragent string.

3. Where the new or modified item is located in the xml list.

Finding useragent strings is a pain, so if you provide all of these I'll 
add your update, if it makes sense, right away. 

Properly constructed Pull requests will generally be accepted as long as they
make sense and don't break anything and fit into the primary function of the
list, which is to be full list useful for web developers and others in the
UserAgent Switcher extension.

---------------------------------------------------------------

Current (2015-09-18) Layout/Structure:

Main categories:

    Browsers - Windows
        Legacy Browsers
        Current
    Browsers - Mac
        Legacy Browsers
        Current
    Browsers - Linux
        Console Browsers
        Legacy Browsers
        Gui Browsers
    Browsers - Unix
        Console Browsers
        Legacy Browsers
        Gui Browsers
    Mobile Devices
        Browsers
        Devices
            Divided into brand/device subsections
        OS
            Divided into OS subsections
        Services
        WAP Phones
    Spiders - Search
    Miscellaneous
        Bots - Spiders
        Browsers - Beos
        Browsers - OS/2
        Downloaders
        Feed Readers
        Game Consoles
        Libraries
        Validators
        Miscellaneous

php-browser-detection's People

Contributors

smithersjr avatar smxi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.