Filesystem or database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
This is just a quick query as I am bit doubtful of the
result..

basically, I get the username and ip of a person who
logs into a remote site and i have to save this data
(please note that this would be thousands of logins)
so I was wondering if it would be better to save the
username and ip as an empty file where the filename
contains both...
e.g:
<username>:<ip>
or in plain english: 
my_username:201.1.1.22

This would save me in hundreds/thousands of calls to
the database and would (in theory) be faster as I
would be accessing the filesystem instead of the
DB....


Right? 


Sometimes i get no username but just the ip address,
in which case I will first have to see if this IP is
already "logged" by me, and if yes, match the username
to the ip.

All usernames:ips expire in 1-24 hrs, I will be
running a cron to 'cull' these dead logins.


Am I on the right track or is it too much of a hassle
and just go in for the database option?

Thanks!
Ryan


------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux