[wp-testers] Re: wp-testers Digest, Vol 31, Issue 26

Felix Ker felixker at gmail.com
Sun Sep 16 14:06:07 GMT 2007


I was looking at the IPs that submitted comments.

Example: IP: 202.156.8.10 , 202-156-8-10.cache.maxonline.com.sg

The IP shown was a cache proxy's IP and not the client's IP.

If it's updated to this, it'll become the client's IP:

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 = "UNKNOWN";
return $ip;
}

Just a suggestion.
-- 
Best regards,

Felix Ker
msn/email : Felix at Ker.SG
voice : (65) 91456635

NOTICE: The contents of this email and any attachments are
confidential. They are intended for the named recipient(s) only.
If you have received this email in error please notify the system
manager or the sender immediately and do not disclose the contents to
anyone or make copies.


* email scanned for viruses, vandals and malicious content *

______________________
SGBloggers - Blogging made easy
www.SGBloggers.com


More information about the wp-testers mailing list