I needed to control the client signing in to my site with the aid of their IP address. So, how can the IP address of the client computer can be trapped
how to trap client IP address
Collapse
X
-
Tags: None
-
This is a very simple one to get the client IP address.But I'm not sure about the working condition of this against the firewalls.
You can find more from here .
[PHP]<?php
if (getenv(HTTP_X_ FORWARDED_FOR))
{
$domain = getenv(HTTP_X_F ORWARDED_FOR);
}
else
{
$domain = getenv(REMOTE_A DDR);
}
echo $domain;
?> [/PHP]
Comment