Download the PHP package tixastronauta/acc-ip without Composer
On this page you can find all versions of the php package tixastronauta/acc-ip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download tixastronauta/acc-ip
More information about tixastronauta/acc-ip
Files in tixastronauta/acc-ip
Download tixastronauta/acc-ip
More information about tixastronauta/acc-ip
Files in tixastronauta/acc-ip
Vendor tixastronauta
Package acc-ip
Short Description Retrieve the most accurate client's IP Address
License MIT
Package acc-ip
Short Description Retrieve the most accurate client's IP Address
License MIT
Please rate this library. Is it a good library?
Informations about the package acc-ip
tixastronauta/acc-ip
Accurate IP Address
PHP library to retrieve the most accurate client's accurate IP Address.
Instead of simply checking the $_SERVER['REMOTE_ADDR']
variable, this library checks for the most common headers that contain the client's IP Address:
Header | Description |
---|---|
HTTP_CF_CONNECTING_IP | Cloudflare-provided real IP of the client. Best when using Cloudflare as a proxy. |
HTTP_X_FORWARDED_FOR | Standard header used by proxies and load balancers. Can contain multiple IPs. The first valid non-private IP is usually the client. |
HTTP_X_REAL_IP | Used by Nginx and some proxies to pass the real IP. |
HTTP_X_CLUSTER_CLIENT_IP | Commonly set by AWS Elastic Load Balancer and other cloud providers. |
HTTP_FORWARDED_FOR | RFC-compliant alternative to X-Forwarded-For . Similar functionality. |
HTTP_FORWARDED | RFC-compliant Forwarded header (e.g., for=192.168.1.1;proto=http ). |
HTTP_X_FORWARDED | Similar to X-Forwarded-For , but used in some legacy systems. |
HTTP_CLIENT_IP | Sometimes set by proxies but is easily spoofed, so it should not be fully trusted. |
REMOTE_ADDR | IP address of the direct connection. Often the load balancer or proxy IP rather than the real client. Used as a last resort. |
Installing
Add this library as a composer dependency:
Using
License
All versions of acc-ip with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
The package tixastronauta/acc-ip contains the following files
Loading the files please wait ....