This is what databases are made for, so my suggestion is to use the database. And when you say: "please note that this would be thousands of logins", is that per second or minute or hour or day? /Peter -----Original Message----- From: Ryan A [mailto:genphp@xxxxxxxxx] Sent: Monday, May 01, 2006 7:14 PM To: php php Subject: Filesystem or database 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php