Hi everyone
I'v made a social networking website with PHP and now I'm trying to store a history of everything my users do in a file..
Here's the question:
Is it better to put it in a .log file and then download the file and save it on my computer at the end of each day OR putting them on a database table.
I think the second way takes a big amount of memory...
What's the regular way?
Thanks
7 2059
History? what type of data you want to save in the history. is it URLs, updated records, user activities? anyway better to use a database for this, because it is easy to manage, once it compare with a flat file.
I agree with ajaxrand's statement 100%. Not only are databases easier to deal with than flat files, they are easier to manage, and much more powerful when it comes to retrieving your data.
Hi
Thank you for your replies.
Actualy I dont need to use these datas so much.. It's just for security. I mean I'm thinking to have a history of all users activities and if something like cheating or abusing happens then I can use this history to find the abuser...
heres an example of what I save:
(UserID: 27) Logged in with IP 213.100.20.74 at 4:00pm
(UserID: 27) Changed his/her profile pictire
(UserID: 27) Logged out at 6:30pm
Thanks again
Hi
Thank you for your replies.
Actualy I dont need to use these datas so much.. It's just for security. I mean I'm thinking to have a history of all users activities and if something like cheating or abusing happens then I can use this history to find the abuser...
heres an example of what I save:
(UserID: 27) Logged in with IP 213.100.20.74 at 4:00pm
(UserID: 27) Changed his/her profile pictire
(UserID: 27) Logged out at 6:30pm
Thanks again
Okay, but consider this:
Lets say you suspect that there is a user account that is being shared, if you have your data in a database, a simple query can pull up login counts per day, time between logins, and excessive failed login attempts. On top of that, you with a simple SQL filter, you have have these reports automated for you, to alert you via email if an account seems suspicious.
Heya, bnashenas1984.
If you store the data in a database, you can sort and filter it on a per-User basis, and you can then add Admin tools (email User, ban User, etc.) directly to the 'view log' page.
Note that you are introducing a *very minimal* amount of overhead by storing the data in the database, but it makes your life a whole lot more convenient, and isn't that what computers are all about?
Thanks
You people realy have open minds. Sometimes you think about something I never do..
Thank you again for sharing your knowledge.
That's because they are GOD!!!!!!!!!!! Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ashot |
last post by:
This is sort of both Python and Vim related (which is why I've posted to
both newsgroups).
Python related:
----------------------
I have been frustrated for quite some time with a lack of a...
|
by: Nicki Pittman |
last post by:
I have a web-based application that contains page with a form to allow
a user to edit their account information (i.e. address, phone, email,
etc.). This form is being pre-populated through XSLT...
|
by: Dave |
last post by:
I have a system that basically stores a database within a database (I'm
sure lots have you have done this before in some form or another).
At the end of the day, I'm storing the actual data...
|
by: Junjie Wang |
last post by:
It seems the aspx always is saved in IE history, how to write aspx that make
IE does not save it ?
Thanks.
-Junjie
|
by: Shyam |
last post by:
Hi,
I wanted some advice on the following. All the users who log in to the
system are created in the SQL Server. As I am not keen to store any user
information on the web.config file for...
|
by: Jacek Dziedzic |
last post by:
Hello!
Suppose I have a class that contains only public members
of builtin types and a default constructor. Because of the
default constructor it is no longer an aggregate and therefore
no...
|
by: (PeteCresswell) |
last post by:
User wants to go this route instead of storing pointers in the DB and the
documents outside.
Only time I tried it was with only MS Word docs - and that was a loooong time
ago - and it seemed to...
|
by: jim.richardson |
last post by:
Hi all,
I'd like a page to be excluded from the back button history, that is,
when a user hits their browser's back button, it never backs into this
particular page.
Can anybody please tell...
|
by: Jonathan Wood |
last post by:
My site includes a feature that allows users to upload an image. (Never more
than one image per user.)
I've been considering storing these uploaded images as a file on the server
with a filename...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |