get_client_ip
NAME
get_client_ip - Return current IP.
SYNOPSIS
get_client_ip([bool])
DESCRIPTION
This function return the current IP. This function can get the IP from 2 sources:
- client_ip from structure connection in apache.
- X-Forwarded-For from table headers_in in apache.
If your site is behind a proxy, the X-Forwarded-For shouls b used.
get_client_ip() will use the configuration file with parameter:
Proxy : "true"
to determine if he get the ip from X-Forwarded-For or client_ip.
You can also force get_client_ip(true) to use X-Forwarded-For.
EXAMPLES
Note: In the followings examples, the _ between the { should be removed to make it work.
a = get_client_ip();
SEE ALSO
AUTHOR
Written by Pierre Laplante, <laplante@sednove.com>
MODIFICATIONS
1.0 2022-07-26 laplante@sednove.com initial version available from version 5.180
Edit