View Full Version : IP logger?
Deimos
07-06-2004, 01:28 PM
Just wondering, is there a mod which logs all ip's that log onto any account on a forum?
I want to keep tabs on my forum to check if any admin/mod/super mod accounts are being "shared".
Andreas
07-06-2004, 01:37 PM
ACP/Users/Search IP Adresses
Enter the username you want to look up and click Find.
Deimos
07-06-2004, 04:39 PM
But that doesn't show what IP's have logged onto the account in question.
I've logged into my admin account with a proxy, logged out and went back to check and it didn't list it.
Modin
07-06-2004, 04:47 PM
yeah, I believe you need to make a post to have an IP logged...is this sufficient to tell if they are being shared?
AN-net
07-06-2004, 05:13 PM
it logs the ip the account was originally registered with and the ip addresses posts have been made with. so basically its signup ip adress and post/thread ip adresses.
i think logging what ip adress they logged in with is kool but that would be alot of data to store>_<
Deimos
07-06-2004, 05:28 PM
i think logging what ip adress they logged in with is kool but that would be alot of data to store>_<
Yea, that's what I need.
Andreas
07-06-2004, 06:29 PM
You might try this:
CREATE TABLE iplog (userid int(10) unsigned NOT NULL, ipaddress varchar(16) NOT NULL, dateline int(10) unsigned NOT NULL, PRIMARY KEY (userid), UNIQUE KEY userip (userid, ipaddress));
Note: If you are using a table prefix you must add it here in front of iplog.
In sessions.php FIND
$sessioncreated = true;
return $session;
REPLACE that with
$sessioncreated = true;
if ($session[userid]) {
$DB_site->query("REPLACE INTO " . TABLE_PREFIX . "iplog SET userid=$session[userid], ipaddress='$session[host]', dateline=" . TIMENOW);
}
return $session;
This will create or update records in table iplog whenever a new session is created. To view this log you can use the attached ACP-Script.
If you want, you can also add a link in the ACP menu:
In admincp/index.php FIND
construct_nav_option($vbphrase['search_ip_addresses'], 'usertools.php?do=doips', '<br />');
BELOW that ADD
construct_nav_option('IP Log', 'iplog.php?do=searchuser', '<br />');
To keep this simple i've not used phrases, so please forgive me ;)
Keep in mind that this adds a query whenever a new user session is created and the table iplog will get BIG.
Modin
07-06-2004, 07:16 PM
* Modin cringes at the storage of that ;)
Bush Music
07-06-2004, 07:29 PM
I don't know what type of server your on or the cp your useing. But if you are using Ensim, you can get Urchin for a dollar from there site. Urchin is a very powerful tool that wil be able to help you, IMHO.
Peace
Reeve of shinra
07-06-2004, 07:40 PM
You might want to consider logging it to a text file on your server. I think its just easier that way and your not bogging down the db as much.
Semere79
02-10-2008, 03:45 PM
I need to actually do this now a days to keep track of lurking posters. How would you go about doing this now that there isn't a sessions.php file that I can find?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.