I use this for IP
//Get the real client IP ("bullet-proof"???)
function GetIP()
{
if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"),
"unknown"))
$ip = getenv("HTTP_CLIENT_IP");
else if (getenv("HTTP_X_FORWARDED_FOR") &&
strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown"))
$ip = getenv("HTTP_X_FORWARDED_FOR");
else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"),
"unknown"))
$ip = getenv("REMOTE_ADDR");
else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR']
&& strcasecmp($_SERVER['REMOTE_ADDR'], "unknown"))
$ip = $_SERVER['REMOTE_ADDR'];
else
$ip = "unknown";
return($ip);
}/*-------GetIP()-------*/
as for the MAC address - you got me - that's on the client machine, so you
would need some client side code for that - JavaScript maybe?
and Happy New Year to everyone too
regards,
Mike
----- Original Message -----
From: Deden En
To: [email protected]
Sent: Monday, January 01, 2007 9:38 PM
Subject: [php_mysql] get ip and mac address
dear all,
how to get ip address and mac address from whom fill
my form ?
happy new year
-deden-
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com