kwazaro/sypex-geoip

Sypex geoip library.

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/kwazaro/sypex-geoip

dev-master 2022-06-21 11:33 UTC

This package is auto-updated.

Last update: 2025-12-21 19:04:46 UTC


README

This library uses Sypex GeoCity database by default.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist kwazaro/sypex-geoip "@dev"

or add

"kwazaro/sypex-geoip": "@dev"

to the require section of your composer.json file.

Usage

Once the library is installed, simply use it in your code by :

<?php
use kwazaro\sypexgeoip\Geoip;

$geo = new Geoip();

$data = $geo->get('xxx.xxx.xxx.xxx');

$country = $geo->getCountry('xxx.xxx.xxx.xxx');

$vity = $geo->getCity('xxx.xxx.xxx.xxx');

$fullInfo = $geo->getCityFull('xxx.xxx.xxx.xxx');