PHPackages                             xenokore/ip-info - 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. xenokore/ip-info

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

xenokore/ip-info
================

GeoIP and IP information. Works with many different services.

001PHP

Since Apr 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/yani/ip-info)[ Packagist](https://packagist.org/packages/xenokore/ip-info)[ RSS](/packages/xenokore-ip-info/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

IP Info Library
===============

[](#ip-info-library)

A standalone PHP library that works with multiple services.

Based on `stevebauman/location` but simplified.

Features
--------

[](#features)

- Get geographical information about an IP address
- Fallback services

Services
--------

[](#services)

- **ipapi.co** (no configuration needed)
- *more to come*

Install
-------

[](#install)

```
composer require xenokore/ip-info

```

Usage
-----

[](#usage)

```
require __DIR__ . '/vendor/autoload.php';

$service = new \Xenokore\IpInfo\IpInfoService();

$ip = $service->getInfo('8.8.8.8');

var_dump($ip);
```

Output:

```
class Xenokore\IpInfo\IpInfo#33 (26) {
  public readonly string $ip =>
  string(7) "8.8.8.8"
  public readonly string $country_code =>
  string(2) "US"
  public readonly ?string $network =>
  string(10) "8.8.8.0/24"
  public readonly ?string $version =>
  string(4) "IPv4"
  public readonly ?string $city =>
  string(13) "Mountain View"
  public readonly ?string $region =>
  string(10) "California"
  public readonly ?string $region_code =>
  string(2) "CA"
  public readonly ?string $country =>
  string(2) "US"
  public readonly ?string $country_name =>
  string(13) "United States"
  public readonly ?string $country_code_iso3 =>
  string(3) "USA"
  public readonly ?string $country_capital =>
  string(10) "Washington"
  public readonly ?string $country_tld =>
  string(3) ".us"
  public readonly ?string $continent_code =>
  string(2) "NA"
  public readonly ?string $postal =>
  string(5) "94043"
  public readonly ?string $latitude =>
  string(8) "37.42301"
  public readonly ?string $longitude =>
  string(11) "-122.083352"
  public readonly ?string $timezone =>
  string(19) "America/Los_Angeles"
  public readonly ?string $utc_offset =>
  string(5) "-0700"
  public readonly ?string $country_calling_code =>
  string(2) "+1"
  public readonly ?string $currency =>
  string(3) "USD"
  public readonly ?string $currency_name =>
  string(6) "Dollar"
  public readonly ?string $languages =>
  string(18) "en-US,es-US,haw,fr"
  public readonly ?string $country_area =>
  string(7) "9629091"
  public readonly ?string $asn =>
  string(7) "AS15169"
  public readonly ?string $org =>
  string(6) "GOOGLE"
  public readonly ?bool $in_eu =>
  bool(false)
}

```

License
-------

[](#license)

MIT

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f952a864ff95e6dc68693bf6a5fff8320a3511840d1b9f1a0722e8f41b5385a?d=identicon)[Yani](/maintainers/Yani)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/xenokore-ip-info/health.svg)

```
[![Health](https://phpackages.com/badges/xenokore-ip-info/health.svg)](https://phpackages.com/packages/xenokore-ip-info)
```

###  Alternatives

[danielstjules/sliceable-stringy

Python string slices in PHP

4751.6k1](/packages/danielstjules-sliceable-stringy)[hunternnm/laravel-roadrunner

Bridge for high-performance PHP application server - RoadRunner

481.2k](/packages/hunternnm-laravel-roadrunner)

PHPackages © 2026

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