PDA

View Full Version : ipaddress logging modifications?


drives fast
01-30-2003, 02:41 AM
I am looking for a re-vamp of the ipaddress logging if possible.

since there are sites out there that crawl the entire internet and store all pages found I had an idea.

I am hoping someone would write a hack that would make it so the ipaddresses for team members (admin, supermods and mods) IP addresses would be inserted as 127.0.0.1 but all other usergroups log as it is now in the database in the post table.

or....

make it so the ipaddresses would compile and be viewble in members memberfile instead of the post table so IP logging can be turned off for the posts

in other words.....have a drop-down in the memberfile for all of their ipaddresses so it would be viewable there instead of compiling them in the post table and allow logging to be turned off.

I hope that made sense.

can this be done?

Xenon
01-30-2003, 12:10 PM
hmm, i don't see the sense for it, crawlers can't get the ip out of the post table...

but at least the first thing to just store the ip for no staffs is easy:
open newreply.php
find:if ($logip==1 or $logip==2) {

and change it to:
if (!in_array($bbuserinfo[usergroupid], array(5,6,7)) and ($logip==1 or $logip==2)) {

drives fast
01-30-2003, 06:32 PM
does that mean it will not store the IPs for those usergroups but still store them for everyone else?

drives fast
01-30-2003, 06:47 PM
I get this warning when viewing IP addresses after doing thaqt
Warning: Address is not a valid IPv4 or IPv6 address in /home/poothead/public_html/forum/admin/user.php on line 1316

drives fast
01-30-2003, 07:34 PM
I would also assume (uh-oh :) ) that something would need to be done to newthread.php as well as postings.php maybe.

automatically inserting 127.0.0.1 rather than not logging admin and mods IP's would avoid that error (once again...I think)

drives fast
01-31-2003, 03:07 AM
^^ :)

Xenon
02-01-2003, 10:38 AM
changes to newthread.php are identical...

so find this block in general:
if ($logip==1 or $logip==2) {
if ($temp = $HTTP_SERVER_VARS['REMOTE_ADDR']) {
$ipaddress = $temp;
} else if ($temp = $REMOTE_ADDR) {
$ipaddress = $temp;
} else {
$ipaddress = $HTTP_HOST;
}
} else {
$ipaddress="";
}


and replace it with:
if ($logip==1 or $logip==2) {
if ($temp = $HTTP_SERVER_VARS['REMOTE_ADDR']) {
$ipaddress = $temp;
} else if ($temp = $REMOTE_ADDR) {
$ipaddress = $temp;
} else {
$ipaddress = $HTTP_HOST;
}
if(in_array($bbuserinfo[usergroupid], array(5,6,7)) {
$ipaddress = '127.0.0.1';
}
} else {
$ipaddress="";
}

sarum
08-22-2005, 05:26 AM
can one of you great ingenious guys translate this to vb3 code?
i would be SOOOOOOOOOO happy if you could
this is exactly what the doctor ordered

but i need help i cant figure it out myself

thanks guys