I want to get an ip address of visitors.
could you tell me what element of $_SERVER[]
i should use?
$_SERVER[\'HTTP_CLIENT_IP\'];
$_SERVER[\'HTT
$_SERVER['REMOTE_ADDR'];
According to the PHP documentation: The IP address from which the user is viewing the current page.
This is the IP that is connected to your server (reported by your server).
The other values are set by the client.
The HTTP_X_FORWARDED_FOR
is a non-standard header (hence the x-prefix), set by certain proxy-servers. It is an attempt by the big proxy server vendors to help ISPs identify abusive IP addresses; it contains a list with all forwarded-for IPs.
I don't know the origin of the HTTP_CLIENT_IP
header