2017 © Pedro Peláez
 

library user-ip

PHP Class to get active user IP Address.

image

yogeshkoli/user-ip

PHP Class to get active user IP Address.

  • Sunday, September 3, 2017
  • by yogeshkoli
  • Repository
  • 1 Watchers
  • 0 Stars
  • 90 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 125 % Grown

The README.md

PHP User IP Address library

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

N|Solid, (*2)

PHP User IP Address Class Library is used to get current User IP Address and validate given IP address., (*3)

Installation

The preferred way to install this extension is through composer., (*4)

To install PHP UserIP library Use following command:, (*5)

$ composer require yogeshkoli/user-ip

Or you can also clone the complete repository with Git Use following command:, (*6)

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

Requirements

This library is supported by PHP versions 5.6, (*7)

Available Methods

Available methods in this library:, (*8)

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

How to Use this package?

Here is sample examples of using this package:, (*9)

Get User IP Address:

 <?php

require __DIR__ . '/../vendor/autoload.php';

use YogeshKoli\UserIP\UserIP;

var_dump(UserIP::get());

Output:, (*10)

/example/UserIPTest.php:7:string '192.168.10.1' (length=12)

Validated Given IP Address:

<?php

require __DIR__ . '/../vendor/autoload.php';

use YogeshKoli\UserIP\UserIP;

$ip = '192.168.10.1';

var_dump(UserIP::validate($ip));

Output:, (*11)

/example/ValidateIPTest.php:9:boolean true

Contribute

  1. Check for open issues or open a new issue to start a discussion around a bug or feature.
  2. Fork the repository on GitHub to start making your changes.
  3. Write one or more tests for the new feature or that expose the bug.
  4. Make code changes to implement the feature or fix the bug.
  5. Send a pull request to get your changes merged and published.

This is intended for large and long-lived objects., (*12)

License

This project is licensed under MIT license. See the LICENSE file for more info., (*13)

2017 Yogesh Koli, yogeshkoli.com, (*14)

If you find it useful, let me know :wink:, (*15)

You can contact me on Twitter or through my email., (*16)

The Versions

03/09 2017

dev-master

9999999-dev

PHP Class to get active user IP Address.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

remote_addr ip address php ip address get current user ip address

17/07 2017

1.0.0

1.0.0.0

PHP Class to get active user IP Address.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

remote_addr ip address php ip address get current user ip address