IP Address:
(from
http://admincmd.blogspot.com/2007/08/php-get-client-ip-address.html[
^])
function getIP() {
$ip;
if (getenv("HTTP_CLIENT_IP"))
$ip = getenv("HTTP_CLIENT_IP");
else if(getenv("HTTP_X_FORWARDED_FOR"))
$ip = getenv("HTTP_X_FORWARDED_FOR");
else if(getenv("REMOTE_ADDR"))
$ip = getenv("REMOTE_ADDR");
else
$ip = "0.0.0.0";
return $ip;
}
What is NIC no? Are you referring to MAC address?
MAC: I don't think you can get this. As far as I know, MAC addresses are dealt by lower layers of the communication stack. So theoretically your code will not be exposed to that low level of information.
However, if your client is in the same LAN as your server, there's a workaround. See the similar question in StackOverflow:
http://stackoverflow.com/questions/1420381/how-can-i-get-the-mac-and-the-ip-address-of-a-connected-client-in-php[
^]