PHPackages                             pendalf89/yii2-clientinfo - 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. pendalf89/yii2-clientinfo

ActiveYii2-extension

pendalf89/yii2-clientinfo
=========================

Yii2 client info component, that detects real client IP address and device type

1.0.1(2y ago)1481MITPHP

Since Jan 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/PendalF89/yii2-clientinfo)[ Packagist](https://packagist.org/packages/pendalf89/yii2-clientinfo)[ RSS](/packages/pendalf89-yii2-clientinfo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Yii2 client info
================

[](#yii2-client-info)

The component provides a convenient way to retrieve information from the client (user), including the IP address, country, and device. It's very fast thanks to caching. [Mobile Detect](https://github.com/serbanghita/Mobile-Detect) library is used to determine the type of device. The [Sypex Geo](https://sypexgeo.net/) database is used to determine the country by IP address.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require pendalf89/yii2-clientinfo

```

or add

```
"pendalf89/yii2-clientinfo": "^1.0.0"

```

to the require section of your `composer.json` file.

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

[](#configuration)

```
'components' => [
    'clientInfo' => 'pendalf89\clientinfo\ClientInfo',
],
```

You also can add DocBlock into `Yii.php` file for IDE autocompleting.

```
/**
 * Class WebApplication
 * Include only Web application related components here
 *
 * @property pendalf89\clientinfo\ClientInfo $clientInfo
 */
class WebApplication extends yii\web\Application
{
}
```

Usage
-----

[](#usage)

It's very easy to use:

```
$isMobile = Yii::$app->clientInfo->isMobile();
$ip = Yii::$app->clientInfo->getIP();
$country = Yii::$app->clientInfo->getCountry();
$isFinland = Yii::$app->clientInfo->isCountry('FI');
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

839d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d4a4b4764a0393c51349746c05db96397f17cce78fa5c025609aa1bb3489eea?d=identicon)[PendalF89](/maintainers/PendalF89)

---

Top Contributors

[![PendalF89](https://avatars.githubusercontent.com/u/5278851?v=4)](https://github.com/PendalF89 "PendalF89 (3 commits)")

---

Tags

IPyii2yii 2device detector

### Embed Badge

![Health badge](/badges/pendalf89-yii2-clientinfo/health.svg)

```
[![Health](https://phpackages.com/badges/pendalf89-yii2-clientinfo/health.svg)](https://phpackages.com/packages/pendalf89-yii2-clientinfo)
```

###  Alternatives

[softark/yii2-dual-listbox

Bootstrap Dual Listbox Widget for Yii 2

20144.4k11](/packages/softark-yii2-dual-listbox)

PHPackages © 2026

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