PHPackages                             yogeshkoli/user-ip - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yogeshkoli/user-ip

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yogeshkoli/user-ip
==================

PHP Class to get active user IP Address.

1.0.0(8y ago)12.9k—0%1MITPHPPHP &gt;=5.6

Since Jul 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/yogeshkoli/user-ip)[ Packagist](https://packagist.org/packages/yogeshkoli/user-ip)[ RSS](/packages/yogeshkoli-user-ip/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PHP User IP Address library
===========================

[](#php-user-ip-address-library)

[![Latest Stable Version](https://camo.githubusercontent.com/a6864e9d694aef874a1ffe03b9d12faa90cf27f6819ddca84e555fb1522742a1/68747470733a2f2f706f7365722e707567782e6f72672f796f676573686b6f6c692f757365722d69702f76657273696f6e)](https://packagist.org/packages/yogeshkoli/user-ip)[![Total Downloads](https://camo.githubusercontent.com/c7607e756b8ee4f34219f2e300e1b886a78e2e9e8b34f7c6d6ffe451249d8bf6/68747470733a2f2f706f7365722e707567782e6f72672f796f676573686b6f6c692f757365722d69702f646f776e6c6f616473)](https://packagist.org/packages/yogeshkoli/user-ip)[![Latest Unstable Version](https://camo.githubusercontent.com/c74f685251ca921a288779850b1f7b38637c84f1c5e60af33a13116a0e17c845/68747470733a2f2f706f7365722e707567782e6f72672f796f676573686b6f6c692f757365722d69702f762f756e737461626c65)](//packagist.org/packages/yogeshkoli/user-ip)[![License](https://camo.githubusercontent.com/681b3d8aa7b47f690af2a232bf249bb59f548a78eb11672c795da649342a400f/68747470733a2f2f706f7365722e707567782e6f72672f796f676573686b6f6c692f757365722d69702f6c6963656e7365)](https://packagist.org/packages/yogeshkoli/user-ip)

[![N|Solid](https://camo.githubusercontent.com/2192921bd991a647d7a7b8b6a8fc27f76fdeda7fd4766d0b4111bfbf437a5cee/687474703a2f2f7777772e6974656368656d70697265732e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30372f6c6f676f2e706e67)](http://www.itechempires.com/)

PHP User IP Address Class Library is used to get current User IP Address and validate given IP address.

### Installation

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

To install PHP UserIP library Use following command:

```
$ composer require yogeshkoli/user-ip

```

Or you can also clone the complete repository with Git Use following command:

```
$ https://github.com/yogeshkoli/user-ip.git

```

### Requirements

[](#requirements)

This library is supported by PHP versions 5.6

### Available Methods

[](#available-methods)

Available methods in this library:

```
UserIP::get();
UserIP::validate($ip);
```

### How to Use this package?

[](#how-to-use-this-package)

Here is sample examples of using this package:

#### Get User IP Address:

[](#get-user-ip-address)

```
