PHPackages                             zulfikaradnan/visitor - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zulfikaradnan/visitor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zulfikaradnan/visitor
=====================

Get visitor by ip and device

v1.0(7y ago)071MITPHP

Since Jul 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zulfikaradnan/visitor)[ Packagist](https://packagist.org/packages/zulfikaradnan/visitor)[ RSS](/packages/zulfikaradnan-visitor/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Getting Started
---------------

[](#getting-started)

Detect visitor is a library for detecting identity of browser, location, OS and device.

### Installing

[](#installing)

Do the following command:

```
composer require zulfikaradnan/visitor

```

After done installing Visitor, Download GeoLite2-City.mmdb from [here](http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz). Or you can use GeoIP2 Maxmind premium.

### How to use

[](#how-to-use)

```
require('vendor/autoload.php');

use ZulfikarAdnan\Visitor\Device;
use ZulfikarAdnan\Visitor\GeoIP2;

$device = new Device(['devices']);
$geoip2 = new GeoIP2([
    'city' => 'GeoLite2-City.mmdb',
    // 'domain' => 'GeoIP2-Domain.mmdb',
    // 'isp' => 'GeoIP2-ISP',
    // 'connection_type' => 'GeoIP2-Connection-Type.mmdb',
]);

var_dump($device->toArray());

var_dump($geoip2->toArray());

```

### Output from use ZulfikarAdnan\\Visitor\\Device

[](#output-from-use-zulfikaradnanvisitordevice)

```
{
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
    "device_type": "desktop",
    "device_brand": "unknown",
    "device_model": "unknown",
    "browser_name": "Chrome",
    "browser_short_name": "CH",
    "browser_version": "67.0.3396.99",
    "browser_engine": "Blink",
    "browser_engine_version": "unknown",
    "os_name": "Windows",
    "os_short_name": "WIN",
    "os_version": "10",
    "os_platform": "x64"
}

```

### Output from ZulfikarAdnan\\Visitor\\GeoIP2

[](#output-from-zulfikaradnanvisitorgeoip2)

```
{
    "ip_address": "114.14.11.1",
    "continent_geoname_id": 6255147,
    "continent_iso_code": "AS",
    "continent_name": "Asia",
    "country_geoname_id": 1643084,
    "country_iso_code": "ID",
    "country_confidence": "unknown",
    "country_name": "Indonesia",
    "subdivision_geoname_id": 1642907,
    "subdivision_iso_code": "JK",
    "subdivision_confidence": "unknown",
    "subdivision_name": "Jakarta",
    "city_geoname_id": 1642911,
    "city_confidence": "unknown",
    "city_name": "Jakarta",
    "average_income": "unknown",
    "accuracy_radius": 1000,
    "latitude": -6.1744,
    "longitude": 106.8294,
    "metro_code": "unknown",
    "population_density": "unknown",
    "postal_code": "unknown",
    "postal_confidence": "unknown",
    "domain": "indosat.com",
    "isp": "PT Indosat Tbk.",
    "organization": "PT Indosat Tbk.",
    "company_number": "unknown",
    "company_organization": "unknown",
    "connection_type": "Cellular"
}

```

### Thank you to :

[](#thank-you-to-)

- [Piwik Detector](https://github.com/matomo-org/device-detector)
- [GeoIp2](https://github.com/geoip2/geoip2)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Unknown

Total

1

Last Release

2911d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6911374?v=4)[Zulfikar Adnan](/maintainers/zulfikaradnan)[@zulfikaradnan](https://github.com/zulfikaradnan)

### Embed Badge

![Health badge](/badges/zulfikaradnan-visitor/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[stevebauman/location

Retrieve a user's location by their IP Address

1.3k8.5M84](/packages/stevebauman-location)[yourls/yourls

Your Own URL Shortener

12.1k27.8k1](/packages/yourls-yourls)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

5.1k4.9k](/packages/shlinkio-shlink)[moodle/moodle

Moodle - the world's open source learning platform

7.2k86.6k70](/packages/moodle-moodle)[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

91208.9k1](/packages/pulkitjalan-ip-geolocation)

PHPackages © 2026

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