PHPackages                             browscap/browscap-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. browscap/browscap-bundle

AbandonedArchivedSymfony-bundle

browscap/browscap-bundle
========================

Allows you to get browser information

1398.9k12[6 issues](https://github.com/browscap/BrowscapBundle/issues)[2 PRs](https://github.com/browscap/BrowscapBundle/pulls)PHP

Since Oct 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/browscap/BrowscapBundle)[ Packagist](https://packagist.org/packages/browscap/browscap-bundle)[ RSS](/packages/browscap-browscap-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Browscap/BrowscapBundle
=======================

[](#browscapbrowscapbundle)

[![Build Status](https://camo.githubusercontent.com/cfa57c3793a20835ea7cb78a96f8342f6d7c6876af15c9314fb291b70456ad80/68747470733a2f2f7472617669732d63692e6f72672f62726f77736361702f42726f777363617042756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/browscap/BrowscapBundle) [![Scrutinizer Quality Score](https://camo.githubusercontent.com/ef9bafb2bc4b342bfb2f37bc027db2c35a83ecb1d48eabd8a0473219d745ffc0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62726f77736361702f42726f777363617042756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f733d30613035386338316539336464323561643538623533386338353738643134633866653331636136)](https://scrutinizer-ci.com/g/browscap/BrowscapBundle/) [![Code Coverage](https://camo.githubusercontent.com/94f7b1a3b490ce6504b5c1456d45c23a22d88c5a9b5ba536e1bed48e275a24c7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62726f77736361702f42726f777363617042756e646c652f6261646765732f636f7665726167652e706e673f733d36666637616432643665663563643237373831656463373062633333373064303631333464303734)](https://scrutinizer-ci.com/g/browscap/BrowscapBundle/)

This is a service for you that is similar to the php function get\_browser(). It uses  project.

Installation
------------

[](#installation)

```
php composer.phar require browscap/browscap-bundle:1.0.*

```

This will install the current version which is beta and is the master branch. I don't want to say it's stable yet until I have some more tests and real world usage under the belt, but should be good enough to use in a production site.

In your app/AppKernel.php file

```
public function registerBundles()
{
    ...
    $bundles = array(
        ...
        new Browscap\BrowscapBundle\BrowscapBundle(),
        ...
    );
    ...
}

```

Configuration
-------------

[](#configuration)

You can see the configuration values and information by running `php app/console config:dump-reference BrowscapBundle`

```
browscap:
    remote_ini_url:       http://tempdownloads.browserscap.com/stream.php?BrowsCapINI
    remote_ver_url:       http://tempdownloads.browserscap.com/versions/version-date.php
    cache_dir:            null # If null, use your application cache directory
    timeout:              5
    update_interval:      432000
    error_interval:       7200
    do_auto_update:       true
    update_method:        'cURL' # Supported methods: 'URL-wrapper','socket','cURL' and 'local'.
    local_file:           null # Only if used
    cache_filename:       'cache.php'
    ini_filename:         'browscap.ini'
    lowercase:            false # You need to rebuild the cache if this option is changed
    silent:               false

```

Usage
-----

[](#usage)

In your controller, you will just need to get the browser information via the dependency injection container.

```
// @var $browscap \Browscap\BrowscapBundle\Browscap
$browscap = $this->container->get('browscap');
$browser = $browscap->getBrowser();

```

In twig templates, you can call the `get_browser` function :

```
{% set browser = get_browser() %}

```

In the future there might be some more functions.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/447419?v=4)[Joshua Estes](/maintainers/joshuaestes)[@JoshuaEstes](https://github.com/JoshuaEstes)

![](https://www.gravatar.com/avatar/2734194006e4987a8e12379a63b4f6c0a4478b5818ea7ce677499b1f714a92d2?d=identicon)[asgrim](/maintainers/asgrim)

![](https://www.gravatar.com/avatar/5fea77dd303122241a6caac15ea7456607bcb6f5db869fc8fc9eaf3ec0630a84?d=identicon)[mimmi20](/maintainers/mimmi20)

![](https://avatars.githubusercontent.com/u/136907?v=4)[Jay Klehr](/maintainers/jaydiablo)[@jaydiablo](https://github.com/jaydiablo)

---

Top Contributors

[![JoshuaEstes](https://avatars.githubusercontent.com/u/447419?v=4)](https://github.com/JoshuaEstes "JoshuaEstes (8 commits)")[![asgrim](https://avatars.githubusercontent.com/u/496145?v=4)](https://github.com/asgrim "asgrim (6 commits)")[![mimmi20](https://avatars.githubusercontent.com/u/1120192?v=4)](https://github.com/mimmi20 "mimmi20 (4 commits)")[![EmmanuelVella](https://avatars.githubusercontent.com/u/663607?v=4)](https://github.com/EmmanuelVella "EmmanuelVella (1 commits)")[![BenjaminPaap](https://avatars.githubusercontent.com/u/396685?v=4)](https://github.com/BenjaminPaap "BenjaminPaap (1 commits)")[![smatyas](https://avatars.githubusercontent.com/u/534550?v=4)](https://github.com/smatyas "smatyas (1 commits)")[![soullivaneuh](https://avatars.githubusercontent.com/u/1698357?v=4)](https://github.com/soullivaneuh "soullivaneuh (1 commits)")[![Spomky](https://avatars.githubusercontent.com/u/1091072?v=4)](https://github.com/Spomky "Spomky (1 commits)")[![tobias-nitsche](https://avatars.githubusercontent.com/u/6302292?v=4)](https://github.com/tobias-nitsche "tobias-nitsche (1 commits)")

### Embed Badge

![Health badge](/badges/browscap-browscap-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/browscap-browscap-bundle/health.svg)](https://phpackages.com/packages/browscap-browscap-bundle)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
