Giter Club home page Giter Club logo

useragentinfo's People

Contributors

quentin389 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

useragentinfo's Issues

Can composer be used?

Hey thanks for the email about this library.

Currently I need a portable solution. That means not needing to use php.ini to point to browsecap. Would it be possible to change browsecap to something other than an ini file or parse it independent from php.ini. This could allow other languages to get involved. Furthermore are you going to add this composer?

Important user agent is not fully overriden.

User agent Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) is only partially overriden from the local array and shows isBanned and Crawler as true, but still identifies as Internet Explorer instead of E-mail address crawler. That's because the override array is treated as part of browscap.
However, I should create an array in the main class which overrides EVERYTHING. That won't be always useful, but will allow for correction of specific cases, like the above one.

Add a website to check user agent using UserAgentInfo.

Several times now I needed to check one user agent using UserAgentInfo, and each time I had to modify my application to do that. Of course it's extremely simple, but still - it would be nicer if I had a website like user-agent-string.info that shows the UA results.

Leverage opcache for uaparser.

Test if uaparser leverages opcache when loading the source JSON file. I'm not sure how opcaches work - will they cache such file? If not, then moving the source file to PHP will be a huuuuge performance boost for non bulk + opcache situation. Which is the most common scenarion on high traffic production servers.

If such switch should be made - create a commit to uaparser project.

How to update

There are notes in the readme mentioning weekly updates. It looks like this has not been updated in some time. Is there still activity on this?

Thank you.

Project being maintained?

I have been using this library at v1.3 for some time and I see it has not been updated in a long time. Is this project more or less dead? If so are there any forks still being updated or other projects being maintained that offer similar functionality?

One major sticking point for me is this library does not support composer which it badly needs to do moving forward (see #4).

Make bot matches less specific / more specific.

Some user agents I override from local class arrays are too specific or too vague for my liking.
For example, I identify Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.0; trendictionbot0.5.0; trendiction search; http://www.trendiction.de/bot; please let us know of any problems; web at trendiction.com) Gecko/20071127 Firefox/3.0.0.11 as trendiction bot... which is ridiculously over-specific.

get_browser comparison at README

The get_browser() function is cited but there are no information why to use a class instead a build-in function. Is interesting to inform user about performance, and about strategies โ€” eg. a fast detection and log with get_browser(), and later using UserAgentInfo for report analyzing log or building a detailed database.

Cache constantly regenerates because of different browscap versions...

The caching mechanism has a built-in version check for all the source parser files.
Browscap version is checked using filesize(ini_get('browscap')), as it is a good enough approximation of the file contents.

The problem is that when you're running a multi server configuration and each server uses its own browscap file, not the one supplied with this class (available in imports/browcap.ini), the files may differ on each server. If that happens and you have a cache that is common for all the servers then the cached UserAgentInfo objects will constantly be invalidated and regenerated, slowing down the servers, as parsing ua strings is a costly operation.

This is not a bug, the class actually behaves correctly, because the parsing results using different browscap version will differ. However, it is an issue, because it's not obvious that this can happen.
The proper way to fix it, without changing anything in UserAgentInfo project is to force your admins to keep the browscap files updated on all the servers, or to point the servers to UserAgentInfo internal browscap.ini file.

However, since that requires changes on the servers, it may not always be an option, it may take long time to change, and so on and so forth.

This will stop being an issue when I stop relying on browscap php.ini configuration and the PHP module for browscap. Using this module is not a good idea for other reasons (such as: required server configuration and parsing speed), so this issue is another important reason to start using browscap fully in PHP, as it is shown in https://github.com/GaretJax/phpbrowscap/

Restore is_banned property for browscap source parser

Browscap removed ->is_banned property which I don't agree with, and I'm actually using this property in my work. It's active for few browser I've added but all the data researched by Gary when he had this property in his browscap project is gone from the files.
I've obtained the latest browscap file version where this information is present and I'm going to extract information from there and put it into nice array to be added to the rest of browscap data when parsing.
I've added raised an issue with browscap team asking them to restore the property.

The list has to be verified before using.

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.