Lets see, the files we would have to edit would be, newreply.php and newpost.php
First, I guess we would have to add another column to our 'post' table.. we would execute this mysql query:
Code:
ALTER TABLE post ADD proxyip VARCHAR(16) not null AFTER ipaddress
in newthread.php find
Code:
if ($logip==1 or $logip==2) {
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
} else {
$ipaddress="";
}
And change it to
Code:
if ($logip==1 or $logip==2) {
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
if (getenv("HTTP_X_FORWARDED_FOR")!="") {
$proxyip=getenv("HTTP_X_FORWARDED_FOR");
}
}
} else {
$ipaddress="";
$proxyip="";
}
That should get $proxyip set. I'm not quite sure how iff works, but if I'm not mistaken instead of using
Code:
if (getenv("HTTP_X_FORWARDED_FOR")!="") {
$proxyip=getenv("HTTP_X_FORWARDED_FOR");
}
would it be:
Code:
$proxyip=iif(getenv("HTTP_X_FORWARDED_FOR")!="",getenv("HTTP_X_FORWARDED_FOR"));
Can someone confirm it?
Now we have to add it to the sql table...