jstewmc/get-ip

Get user's IP address

v0.1.0 2016-11-24 19:30 UTC

This package is auto-updated.

Last update: 2024-10-29 04:42:05 UTC


README

Get a user's IP address.

namespace Jstewmc\GetIp;

// instantiate the service
$service = new GetIp();

$service('foo');      // returns null
$service('1.2.3.4');  // returns '1.2.3.4'

This library is very simple. If the request's IP address is valid, this library will return it. If not, this library will return null.

Author

Jack Clayton

License

MIT

Version

0.1.0, November 24, 2016

  • Initial release