2017 © Pedro Peláez
 

library ip2c

Small and simple library to resolve the country where an Ip comes from.

image

wakumaku/ip2c

Small and simple library to resolve the country where an Ip comes from.

  • Friday, June 2, 2017
  • by wakumaku
  • Repository
  • 1 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 20 % Grown

The README.md

ip2c - Ip to Country PHP library

Codacy Badge Build Status Code Coverage Scrutinizer Code Quality, (*1)

Ip2c is a small php library to retrieve the country where an Ip comes from., (*2)

This library uses http://ip2c.org as a service., (*3)

Installation

Prerequisites

Ip2c requires PHP 5.3.3 or greater., (*4)

If you want to run the tests you'll need a greater one (>=5.5), (*5)

Setup through composer

First, add Ip2c to the list of dependencies inside your composer.json:, (*6)

{
    "require": {
        "wakumaku/ip2c": "dev-master"
    }
}

Composer update:, (*7)

$> composer update

How to use it

include vendor/autoload.php';

$ip2c = \Ip2c\Ip2cFactory::build();

$result = $ip2c->self();

echo "Status: " . $result->status() . "\n";
echo "Iso2: " . $result->iso2() . "\n";
echo "Iso3: " . $result->iso3() . "\n";
echo "Name: " . $result->name() . "\n";

Output:, (*8)

    Status: 1
    Iso2: ES
    Iso3: ESP
    Name: Spain

The Versions

02/06 2017

dev-master

9999999-dev https://github.com/wakumaku/ip2c

Small and simple library to resolve the country where an Ip comes from.

  Sources   Download

to kill

The Requires

  • ext-curl *

 

The Development Requires

by Avatar wakumaku

ip maxmind country dns whois ip to country ip2c

19/04 2016

dev-v1-dev

dev-v1-dev https://github.com/wakumaku/ip2c

Small and simple library to resolve the country where an Ip comes from.

  Sources   Download

to kill

The Requires

  • ext-curl *

 

The Development Requires

by Avatar wakumaku

ip maxmind country dns whois ip to country ip2c

19/04 2016

v1.0.1

1.0.1.0 https://github.com/wakumaku/ip2c

Small and simple library to resolve the country where an Ip comes from.

  Sources   Download

to kill

The Requires

  • ext-curl *

 

The Development Requires

by Avatar wakumaku

ip maxmind country dns whois ip to country ip2c

16/12 2015

v1.0.0

1.0.0.0 https://github.com/wakumaku/ip2c

Small and simple library to resolve the country where an Ip comes from.

  Sources   Download

to kill

The Requires

  • ext-curl *

 

The Development Requires

by Avatar wakumaku

ip maxmind country dns whois ip to country ip2c