Previous Thread
Next Thread
Print Thread
Rate Thread
#103768 06/14/2002 2:37 PM
Joined: Nov 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 12
I want to log the last date/time of access by all of my members. I've looked in ultimatebb.cgi and *think* I've found where I need to make a change to accomplish what I need.

In the code, I see:
quote:
# set new last login
my $cookie2 = cookie(
-name => "login$vars_config{Cookie_Number}",
-value => [$GotTime{LastLoginDT}, $GotTime{LastLoginJulian}],
-path => '/',
-expires => '+1y'
);

It *seems* I can just add at the bottom of the above (and before my $cookie3;):
quote:
open(XXX,">/mydomain/cgi-bin/$user_number.dlv");print XXX "$cookie2";close(XXX);
With much trepidation, I tried it for a few minutes, and it logged some of the users, but I'm not sure it got all of them. Can anyone tell me if this is the only place I need to add it, or if it will even work? TIA

Sponsored Links
#103769 06/14/2002 10:32 PM
Joined: Sep 2001
Posts: 379
Member
Member
Offline
Joined: Sep 2001
Posts: 379
I'd rather go for the "&WriteFileAsString" method (routine provided by UBB), hehe. tipsy

Anyway... it depends on your visitors.
Not everyone uses cookies, so relying on cookies for the last login date/time won't be reliable, either.

In ultimatebb.cgi, find:

Code
[/code]Add above:

[code]
I think that should do the trick.
That'll write the date/time to "membernumber.dlv" located in your "members" directory.

Hope this was of some help to you. smile

#103770 06/15/2002 5:47 PM
Joined: Nov 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 12
Excellent! Thanks for the assist smile

#103771 06/15/2002 6:42 PM
Joined: Sep 2001
Posts: 379
Member
Member
Offline
Joined: Sep 2001
Posts: 379
My pleasure! smile

#103772 06/16/2002 8:43 AM
Joined: Nov 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 12
Just a followup, for anyone reading this, the code needs to be in both places, in order, apparently, to catch both logged in and non-logged in users.

I wasn't able to get the &WriteFileAsString to work (didn't really spend much time on it, got an error, so I pulled it smile ), but the $GotTime{LastLoginDT} is MUCHO cleaner.

My board is not very high activity (maybe 20 visitors a day) so it will take a while for these to accumulate. I've already got a script to download the ".dlv" files and extract the info in a report. This is gonna be a "Good Thing"(tm) and will eventually allow pruning members that register but never return. It's too bad it won't capture users that return but don't log in, but that's "sort of" covered using the web logs and IP addresses (if they're not AOL or some other ISP that randomly assigns IP addresses).

Speaking of IP addresses, I have to drop the TLD to get anything usable, but it's not very accurate that way. I wish the "Internet Gods" would come up with a better (unique) way to identify traffic wink

Thanks again, Idle, I'd have never figured out why it wasn't capturing all the users if you hadn't pointed it out. I sure got a long way to go to get a handle on how all this UBB stuff works!

Sponsored Links
#103773 06/16/2002 10:46 AM
Joined: Sep 2001
Posts: 379
Member
Member
Offline
Joined: Sep 2001
Posts: 379
If you're looking for the most "recent activities" for your members, you may want to have a look at my "Advanced IP Logging" mod.
(6.1 - 6.3x).
It logs those (IP and date/time), you can search for logged IPs, view IP history for your members, adds a "Recent Activities" section below "Bonus Information" in profiles, etc. smile

#103774 06/16/2002 7:15 PM
Joined: Nov 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 12
Thanks for the offer, but I'm already checking "visits" by IP address based on the web logs. I'm using a script that grabs both the registration IP and the "last edit" IP, then slogs through ALL posts to extract any additional to produce an "IP database" for reference.

The trouble with IP's is that they are not unique, e.g., AOL randomly assigns them from their "pool" and two different users may have the same IP on different days. Also, some users appear to almost never get the same IP twice, so I don't even consider the TLD.

Unfortunately, the logging generated by the above hacks doesn't appear, unless they actually login (or already are logged in when they visit). If they are not logged in, and just browse the board, the ONLY record is the web logs.

At the moment, I'm tracking both, and trying to figure some way to combine the results, but neither is really a good solution.

I guess I could make the board viewable by registered user's only, but don't want to go that route, it might discourage "future" users from hanging around for a while.

I'm afraid that given the IP's not being unique, and allowing non registered (non logged in) folks to read the board, I'll never *really* know, except for the folks with static IPs. frown

*sigh* Back to the drawing board...

#103775 06/16/2002 8:16 PM
Joined: Sep 2001
Posts: 379
Member
Member
Offline
Joined: Sep 2001
Posts: 379
I'm aware of AOL and other such cable providers, rotating the IPs amongst their members... rather annoying, indeed.

Then again, if you take a look at my Advanced IP Loggin mod, you can use it as a reference to log IPs when they post, register, login/logout, etc.

I have already included the login/register and posting (you'll soon see where to add the code to log IPs on user logout).

Of course, unless you use my routine or make your own from ubb_lib_idle.cgi (Advanced IP Logging), you'll end up with pretty heavy log files for your members since this will record every IP, and doesn't check if it already exists in the member's log file. wink

#103776 06/17/2002 10:07 AM
Joined: Nov 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 12
Yup, I see the potential for some LARGE log files, that's why I went with an individual file for each user, that just gets overwritten with the latest information. I use the posts as my "IP History" for each user(and their registration and last edit IP from their record), and just scan it once a day to collect all the IPs each user has ever posted from.

#103777 06/17/2002 8:23 PM
Joined: Sep 2001
Posts: 379
Member
Member
Offline
Joined: Sep 2001
Posts: 379
Nifty!

Sponsored Links

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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 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 20240506)