PHPackages                             sourcebroker/ip2geo - 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. sourcebroker/ip2geo

ActiveTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

sourcebroker/ip2geo
===================

Returns geo data based on IP - uses Maxmind databases (free/commercial)

1.0.1(6y ago)33.1k2GPL-2.0-or-laterPHPCI failing

Since Jul 17Pushed 6y ago1 watchersCompare

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

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

TYPO3 Extension ip2geo
======================

[](#typo3-extension-ip2geo)

> [![https://poser.pugx.org/sourcebroker/ip2geo/license](https://camo.githubusercontent.com/87a10a21e100cf561af90759ff0dddef87d7d5eb3b32539ac2518b8e91298f15/68747470733a2f2f706f7365722e707567782e6f72672f736f7572636562726f6b65722f69703267656f2f6c6963656e7365)](https://packagist.org/packages/sourcebroker/ip2geo)

- [What does it do?](#what-does-it-do)
- [How to install?](#how-to-install)
- [How to use?](#how-to-use)
- [Additional options](#additional-options)
- [Changelog](#changelog)

[What does it do?](#id1)
------------------------

[](#what-does-it-do)

This extension provides scheduler job to download maxmind database (free or commercial) and some small class with methods to get interesting content like country, continent etc.

[How to install?](#id2)
-----------------------

[](#how-to-install)

1. Install using composer:

    ```
    composer require sourcebroker/ip2geo
    ```
2. Go to Scheduler module and add new job "Download geolocation database"
3. While adding scheduler job you need two parameters:

    1. `Database name`. This can an be any string. Example: "freeCountry", "commercialCountry". This name will be used later in php code like `GeoIp::getInstance('freeCountry')` .
    2. `Download URL`. Maxmind database download link.
        - For country lite database the url is:
        - For city lite database the url is:
        - If the links above does not work here is the page at maxmind with list databases:
4. Run the scheduler and check folder `/uploads/tx_ip2geo/`. The database should be downloaded there.

[How to use?](#id3)
-------------------

[](#how-to-use)

In your code get the data with following call:

1. For country database:

    ```
    $countryCode = GeoIp::getInstance('freeCountry')->getCountryCode(); // assuming you named database with "freeCountry" in scheduler task
    ```

    For IP 83.97.23.149 you will get "DE" as response:
2. For city database:

    ```
    $locationData = GeoIp::getInstance('freeCity')->getLocation(); // assuming you named database with "freeCity" in scheduler task
    ```

    For IP 83.97.23.149 you will get following data as response:

    ```
    Array
    (
       [continentCode] => EU
       [countryCode] => DE
       [countryName] => Germany
       [city] => Berlin
       [postalCode] => 10178
       [latitude] => 52.5196
       [longitude] => 13.4069
    )
    ```

[Additional options](#id4)
--------------------------

[](#additional-options)

You can set some options for this extension in `$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ip2geo']`. You can use `typo3conf/LocalConfiguration` file to store this values.

1. `defaultLocalIP`For local development you IP is usually 127.0.0.1 and this IP of course does not exist in Maxmind database. For this situation Maxminf API will return "The address 127.0.0.1 is not in the database.". You can fix it by setting default IP if the IP is detected as 127.0.0.1. Example configuration:

    > ```
    > 'EXTCONF' => [
    >   'ip2geo' => [
    >     'defaultLocalIP' => '83.97.23.149',
    >   ],
    > ],
    > ```
2. `fakeIpHeaderName`This is a name of header which you can use to overwrite the value of IP. This value must be unique so nobody except you can overwrite IP. TIP: a nice chrome extension for setting headers is "ModHeader". Example:

    > ```
    > 'EXTCONF' => [
    >   'ip2geo' => [
    >     'fakeIpHeaderName' => 'myFakeIpHeader1991718263162831',
    >   ],
    > ],
    > ```

`fakeIpHeaderName` has precedence over `defaultLocalIP` when both are set.

[Changelog](#id5)
-----------------

[](#changelog)

See

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~82 days

Total

4

Last Release

2337d ago

Major Versions

0.6.0 → 1.0.02019-07-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/6066d053dfdc12f5a676444f6a40b5b7d0b5a112e0ab746c8b04f4a7201b0624?d=identicon)[sourcebroker](/maintainers/sourcebroker)

---

Top Contributors

[![kszymukowicz](https://avatars.githubusercontent.com/u/1453553?v=4)](https://github.com/kszymukowicz "kszymukowicz (15 commits)")

---

Tags

ip2geomaxmindtypo3typo3-cmstypo3-cms-extension

### Embed Badge

![Health badge](/badges/sourcebroker-ip2geo/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k68](/packages/friendsoftypo3-content-blocks)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40543.5k](/packages/wazum-sluggi)[typo3/cms-redirects

TYPO3 CMS Redirects - Create manual redirects, list existing redirects and automatically createredirects on slug changes.

167.6M84](/packages/typo3-cms-redirects)[typo3/cms-form

TYPO3 CMS Form - Flexible TYPO3 frontend form framework that comes with a backend editor interface.

147.8M287](/packages/typo3-cms-form)[typo3/cms-sys-note

TYPO3 CMS System Notes - Records with messages which can be placed on any page and contain instructions or other information related to a page or section.

116.5M41](/packages/typo3-cms-sys-note)

PHPackages © 2026

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