8000 GitHub - Worm/GetClientIP: GetClientIp is a lightweight PHP class for get real/original client IP address, without proxy as opera mini and other.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

GetClientIp is a lightweight PHP class for get real/original client IP address, without proxy as opera mini and other.

Notifications You must be signed in to change notification settings

Worm/GetClientIP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GetClientIp is a lightweight PHP class for get real/original client IP address, without proxy as opera mini and other. It uses the specific $_SERVER headers to detect client ip address. Class search valid IPv4 of client.

Composer install

composer require worm/getclientiplib
{
    "require": {
        "worm/getclientiplib": "^1.0"
    }
}

Usage

$getClientIp = new GetClientIp;
$ip = $getClientIp->getClientIp();
$longIp = $getClientIp->getLongClientIp();

Usage with manual data

$getClientIp = new GetClientIp(array( "REMOTE_ADDR"           => "1.2.3.4",
                                      "REMOTE_PORT"           => "",
                                      "SERVER_ADDR"           => "1.1.1.1",
                                      "X_FORWARDED_FOR"       => "2.3.4.5,1.2.3.4, 1.2.3.4" ));
$ip = $getClientIp->getClientIp();
$longIp = $getClientIp->getLongClientIp();

About

GetClientIp is a lightweight PHP class for get real/original client IP address, without proxy as opera mini and other.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0