2017 © Pedro Peláez
 

library php-ipify

PHP client library for ipify: A Simple IP Address API.

image

benjamin-smith/php-ipify

PHP client library for ipify: A Simple IP Address API.

  • Friday, February 23, 2018
  • by benjamin-smith
  • Repository
  • 3 Watchers
  • 22 Stars
  • 1,545 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 4 Versions
  • 6 % Grown

The README.md

php-ipify

Software License Build Status Quality Score Total Downloads, (*1)

This library will retrieve your public IP address from ipify's API service, and return it as a string., (*2)

This library also has some other nice features you might care about:, (*3)

  • This library handles exceptions properly, and usage examples below show you how to deal with errors in a foolproof way.
  • This library only makes API requests over HTTPS.

Install

Via Composer, (*4)

``` bash $ composer require benjamin-smith/php-ipify, (*5)


## Usage ``` php echo Ipify\Ip::get();

Or, if your inclined to catch any errors:, (*6)

try {
    $ip = Ipify\Ip::get();    
} catch (ConnectionError $e) {
    // If you get here, it means you were unable to reach the ipify service,
    // most likely because of a network error on your end.
} catch (ServiceError $e) {
    // If you get here, it means ipify is having issues, so the request
    // couldn't be completed :(
} catch (Exception $e) {
    // Something else happened (non-ipify related).
}

Change log

Please see CHANGELOG for more information what has changed recently., (*7)

Testing

bash $ vendor/bin/phpunit, (*8)

Contributing

Please see CONTRIBUTING for details., (*9)

Security

If you discover any security related issues, please email ben@benjaminsmith.com instead of using the issue tracker., (*10)

Credits

License

The MIT License (MIT). Please see License File for more information., (*11)

The Versions

23/02 2018

dev-master

9999999-dev https://github.com/benjamin-smith/php-ipify

PHP client library for ipify: A Simple IP Address API.

  Sources   Download

MIT

The Requires

 

The Development Requires

ipify

15/03 2016

1.0.0

1.0.0.0 https://github.com/benjamin-smith/php-ipify

PHP client library for ipify: A Simple IP Address API.

  Sources   Download

MIT

The Requires

 

The Development Requires

ipify

12/06 2015

0.1.1

0.1.1.0 https://github.com/benjamin-smith/php-ipify

PHP client library for ipify: A Simple IP Address API.

  Sources   Download

MIT

The Requires

 

The Development Requires

ipify

12/06 2015

0.1.0

0.1.0.0 https://github.com/benjamin-smith/php-ipify

PHP client library for ipify: A Simple IP Address API.

  Sources   Download

MIT

The Requires

 

The Development Requires

ipify