Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2002
Posts: 266
Kel
Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
I would like to be able to have logs of certain forums to show who accesses that forum and when.

Is there a way to do this?

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
That's possible but will require some hacking.
You could use a function similar to the admin_log functions that generates the log file in the admin area.

Joined: Jan 2002
Posts: 266
Kel
Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Yes, that is pretty much what I had in mind... similar to the log file for the admin area. As a matter of fact, it's my admin forum that I would like to log. It appears as if I might have a breach in that private forum... or else a leak, which I don't even want to think about.

Does anyone know of any ways to breach private forums? If there is a way and a hole that I need to plug, can you please send me a private message or email me?

Any and all assistance would be greatly appreciated.

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
It's hard to say Sasha, I suppose there could be a couple of factors. Could it be someone who's been removed from that forum is still able to see it or that someone who has known access is sharing info outside of it? I know that I have had issues removing people, it's easy to miss a step (for me anyway ) If someone is not part of that group then access is very unlikely as it's quite secure and there isn't any known vulnerabilities.

Joined: Jan 2002
Posts: 266
Kel
Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Eric... that's kinda what I was afraid of. I know that the private forums are pretty secure... I've tested them many times in many ways... I guess I just didn't want to consider that perhaps I have someone who is "leaky"...

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I've done an access log thing like this logging everyone who went into a specific forum. - the code was simple. I'll dig it up and post it tonight.

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
That'll be a neat tool to have Josh

Joined: Jan 2002
Posts: 266
Kel
Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Josh... that would be MUCH appreciated!! Thank you!!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK - all I did - quick and dirty logs access to the postlist page of a particular forum.

In postlist.php

Below the // Get the user info and authenticate() function - add this:

Code
<br />	// Log their visit to a log file - by JoshPet<br />	if ($Board == "UBB25") {<br />		$LoginIP = find_environmental ("REMOTE_ADDR");<br />		$logintime = date("Y/m/d:H:i:s O");<br />		$extralogname = "{$config['adminlog']}/access.log";<br />		<br />		error_log("$logintime,$LoginIP,postlist,{$user['U_Username']},{$user['U_Number']},{$user['U_Status']},Board: $Board\n",3,$extralogname);<br />	}	<br />


Where I have UBB25 above - substitute the keyword of the board you want to log. Then in your admin log directory - you'll have a file named 'access.log' with all the access into that forum.

Note this isn't fancy and doesn't rotate the logs etc.... so you'll want to rename them/delete them from time to time so you don't end up with huge log files.

Joined: Jan 2002
Posts: 266
Kel
Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Josh... this is exactly what I needed!!

BUT... I can't view the log from the admin control panel where I view my other admin logs. The access.log is not available in the drop down menu of admin logs to view.

The logging is being done but in order to view the access.log itself, I have to download it to my hard drive by FTP and open it with notepad.

What did I do wrong?

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Well to do that, you'd have to have it writing to the admin logs.

If you use the above example access.log - then there's no script which reads that. The script you are talking about reads the admin logs.

So you could have your thing write to the admin log instead then you could read it with the admin log stuff, or you you could duplicate the script which reads the admin log - and tweak the filename that it reads, and add a link for it in the admin menu.

That's what I did. I can't post it as it's pretty much almost an identical copy of the script which reads the admin log with just the filename changed (and it's a copyrighted script), but that gives you the idea.

Joined: Jan 2002
Posts: 266
Kel
Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Gotcha! Thank you much!!


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)