how to use log file to track users activities??

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
User avatar
PHPycho
Forum Contributor
Posts: 336
Joined: Fri Jan 06, 2006 12:37 pm

how to use log file to track users activities??

Post by PHPycho »

we are making an e-marketting where vendors can add, delete,update their poducts.
what i wanna do is to track vendors activities using log file....
and the daily tracked data can be read by admin....
how's that possible.......
Please help me with the neccessay code....
another question is :
is log sytem is better or database system for tracking the vendors activities, tell me which one to use and why ?
Please help me on the specified topic...i would be very greatful of you....i am already a very greatful of you as u guys had helped me alot.......
Thanks in advance to all those guys of this Forum..
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

fopen, fwrite and fclose if you want to use a flat file.

If database (my prefered choice for storing any and all data is in the DB, however it can pay dividends to log key aspects, such as errors, in a flatfile incase the DB dies or such.) then just the usual insert, and a select on a php script just like any other pages with info from the DB.
Post Reply