Hey Everybody, I wanted to ask if anybody new the simple snippet of code I need to put into and html page to show the IP adress of the person who is browsing, I've seen it on several pages so I know it can be done, I need it for testing. Thanks
Not in HTML In ASP: request.servervariables("remote_addr") OR request.servervariables("remote_host") There's probably a JavaScript to do it too that would work in a flat HTML page
In PHP with Proxy Detection: if (getenv(HTTP_X_FORWARDED_FOR)) { $ipaddress = getenv(HTTP_X_FORWARDED_FOR); } else { $ipaddress = getenv(REMOTE_ADDR); } echo "Your IP Address: " . $ipaddress; PHP:
yup, getenv will not be supported in further versions, which will make ur script stop working. always avoid deprecated tags and functions.