2017 © Pedro Peláez
 

library ipinfodb-php

PHP IP to Country for https://ipinfodb.com/api

image

tiran133/ipinfodb-php

PHP IP to Country for https://ipinfodb.com/api

  • Sunday, June 10, 2018
  • by tiran133
  • Repository
  • 1 Watchers
  • 0 Stars
  • 237 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 193 % Grown

The README.md

How to install:

Install Package, (*1)

composer require tiran133/ipinfodb-php

Publish Config, (*2)

php artisan vender:publish --provider="Tiran133\Laravel\IPInfoDBServiceProvider"

Add your api key to .env, (*3)

IPINFODB_API_KEY=<Your IP Key>

How to use:

Via Facade:, (*4)

Country:, (*5)

$country = \Tiran133\Laravel\Facade\IPInfo::getCountry($ip);

$country->countryName;
$country->countryCode;

City:, (*6)

$city = \Tiran133\Laravel\Facade\IPInfo::getCity($ip);

$city->countryName;
$city->countryCode;
$city->regionName;
$city->cityName;
$city->zipCode;
$city->latitude;
$city->longitude;
$city->timeZone;

Via app(), (*7)

Country:, (*8)

$ipinfo =  app('ipinfodb');
$country = $ipinfo->getCountry($ip);     

$country->countryName;
$country->countryCode;

City:, (*9)

$city = \Tiran133\Laravel\Facade\IPInfo::getCity($ip);

$city->countryName;
$city->countryCode;
$city->regionName;
$city->cityName;
$city->zipCode;
$city->latitude;
$city->longitude;
$city->timeZone;

The Versions

10/06 2018

dev-master

9999999-dev

PHP IP to Country for https://ipinfodb.com/api

  Sources   Download

The Requires

 

by Alexander Wolff

10/06 2018

dev-develop

dev-develop

PHP IP to Country for https://ipinfodb.com/api

  Sources   Download

The Requires

 

by Alexander Wolff

10/06 2018

v0.1.4

0.1.4.0

PHP IP to Country for https://ipinfodb.com/api

  Sources   Download

The Requires

 

by Alexander Wolff

10/06 2018

v0.1.3

0.1.3.0

PHP IP to Country for https://ipinfodb.com/api

  Sources   Download

The Requires

 

by Alexander Wolff

10/06 2018

v0.1.2

0.1.2.0

PHP IP to Country for https://ipinfodb.com/api

  Sources   Download

The Requires

 

by Alexander Wolff

20/05 2018

v0.1.1

0.1.1.0

PHP IP to Country for https://ipinfodb.com/api

  Sources   Download

The Requires

 

by Alexander Wolff

20/05 2018

v0.1.0

0.1.0.0

PHP IP to Country for https://ipinfodb.com/api

  Sources   Download

The Requires

 

by Alexander Wolff