PHPackages                             betsol/ipgeobase-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. betsol/ipgeobase-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

betsol/ipgeobase-client
=======================

PHP client library for IpGeoBase XML API

v1.0.0(11y ago)2592MITPHP

Since Oct 14Pushed 11y ago1 watchersCompare

[ Source](https://github.com/betsol/ipgeobase-client)[ Packagist](https://packagist.org/packages/betsol/ipgeobase-client)[ Docs](https://github.com/betsol/ipgeobase-client)[ RSS](/packages/betsol-ipgeobase-client/feed)WikiDiscussions master Synced 1mo ago

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

IpGeoBase API Client
====================

[](#ipgeobase-api-client)

[![Latest Stable Version](https://camo.githubusercontent.com/aa4dac175870404b0431fa42c0bb4f3915ea2bd5b63083726e751d9244d77d16/68747470733a2f2f706f7365722e707567782e6f72672f626574736f6c2f697067656f626173652d636c69656e742f762f737461626c652e737667)](https://packagist.org/packages/betsol/ipgeobase-client)[![License](https://camo.githubusercontent.com/be38062cd16edf97a0813a12b8a74ff444dd67a2134f3a80ef88d7cf2d7f1bae/68747470733a2f2f706f7365722e707567782e6f72672f626574736f6c2f697067656f626173652d636c69656e742f6c6963656e73652e737667)](https://packagist.org/packages/betsol/ipgeobase-client)

Description
-----------

[](#description)

This library for *PHP 5* provides you with convenient object-oriented access to [IPGeoBase](http://ipgeobase.ru/) XML API.

*IpGeoBase* is a free service that allows you to resolve Russian and Ukrainian IP adresses into geographical locations with the maximum precision of a city. Database has a daily updates.

### Features

[](#features)

- Uses latest [Guzzle 5](http://guzzle.readthedocs.org/en/latest/) library to communicate over HTTP
- [PSR standards](http://www.php-fig.org/) compliant
- Supports [Composer](https://getcomposer.org/)
- Returns response in convenient and easy to use [models](Model/)
- Provides distinguishable catchable [exceptions](Exception/)
- Available for commercial products for free ([MIT license](#license))

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

[](#installation)

Install library with *Composer*:

`composer require betsol/ipgeobase-client`

Usage
-----

[](#usage)

```
// Creating a client:
$ipGeoBaseClient = new Betsol\IpGeoBase\Api\Client;

// You can pass API's base URL to it if required:
$ipGeoBaseClient = new Betsol\IpGeoBase\Api\Client('http://ipgeobase.ru:7020');

// Looking up IP address:
$response = $ipGeoBaseClient->lookupIp('93.184.216.119');

// Getting country:
$response->getCountry();
// "RU"

// Getting city:
$response->getCity();
// "Москва"

// Getting region:
$response->getRegion();
// "Москва"

// Getting district:
$response->getDistrict();
// "Центральный федеральный округ"

// Accessing IP range:
$ipRange = $response->getIpRange();

$ipRange->getStartIp();
// "213.180.200.192"

$ipRange->getEndIp();
// "213.180.208.255"

// Returning IP range as a string:
(string) $ipRange;
// "213.180.200.192 - 213.180.208.255"

// Accessing coordinates:
$coordinates = $response->getCoordinates()

$coordinates->getLatitude();
// float(55.755787)

$coordinates->getLongitude();
// float(37.617634)

// Returning coordinates as a string:
(string) $coordinates;
// string(20) "55.755787, 37.617634"
```

Feedback
--------

[](#feedback)

If you have found a bug or have another issue with the library - please [create an issue](//github.com/betsol/ipgeobase-client/issues/new)in this GitHub repository.

If you have a question - file it with [StackOverflow](http://stackoverflow.com/questions/ask) and send me a link to . I will be glad to help.

Have any ideas or propositions? Feel free to contact me by [E-Mail](mailto:s.fomin@betsol.ru).

Cheers!

Sponsor
=======

[](#sponsor)

This library is sponsored by [Winners Academy](http://winnersacademy.ru/).

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2014 Slava Fomin II

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community4

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

4228d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6a73e4f0ce6ff6be2532096f09c444ebe2c4e030e7d1511f665ab7818199b67?d=identicon)[s.fomin](/maintainers/s.fomin)

---

Tags

Guzzleipgeobasebetsol

### Embed Badge

![Health badge](/badges/betsol-ipgeobase-client/health.svg)

```
[![Health](https://phpackages.com/badges/betsol-ipgeobase-client/health.svg)](https://phpackages.com/packages/betsol-ipgeobase-client)
```

###  Alternatives

[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

43117.4M104](/packages/kevinrob-guzzle-cache-middleware)[eightpoints/guzzle-bundle

Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony. Comes with easy and powerful configuration options and optional plugins.

45912.1M55](/packages/eightpoints-guzzle-bundle)[guzzlehttp/oauth-subscriber

Guzzle OAuth 1.0 subscriber

24114.5M141](/packages/guzzlehttp-oauth-subscriber)[caseyamcl/guzzle_retry_middleware

Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts

21610.7M64](/packages/caseyamcl-guzzle-retry-middleware)[php-http/guzzle7-adapter

Guzzle 7 HTTP Adapter

9057.1M555](/packages/php-http-guzzle7-adapter)[graham-campbell/guzzle-factory

Provides A Simple Guzzle Factory With Good Defaults

916.4M49](/packages/graham-campbell-guzzle-factory)

PHPackages © 2026

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