Re: [PHP] [scalability, performance, DoS] To or not to process images at runtime

2008-08-07 Thread Marcelo de Moraes Serpa
@Per Jessen Disk-space is cheap, especially if you don't need to be worried about backup etc. I'm not sure why you think applying watermarks in an off-line process would any less manageable than doing it on-line. Well, the processing will be "online" in the sense that it will be triggered via an

[PHP] [scalability, performance, DoS] To or not to process images at runtime

2008-08-06 Thread Marcelo de Moraes Serpa
Hello, My next project will be a kind of online photo viewer. All of these photos will need to have watermark applied to them. The problem is that, depending on the picture, different watermarks need to be applied. The easiest solution would be to process these picture at runtime using GD, apply t

[PHP] SQL Distinct-like behaviour

2007-08-23 Thread Marcelo de Moraes Serpa
How could I iterate over the files in a directory and build a list of unique filenames? Take the following filelist: file1_01.jpg file2_01.jpg file2_02.jpg file2_03.jpg file3_01.jpg file3_02.jpg file3_03.jpg file4_01.jpg file4_02.jpg file4_03.jpg I would like to build an array like this: $names =

[PHP] DATETIME or UNIX TIMESTAMPS?

2006-10-26 Thread Marcelo de Moraes Serpa
Hello list, I've always used Unix Timestamps until now, but lately I've reading about MySQL's datetime datatype and its benefits (dates before 1970, after 2030, SQL functions to deal with them, etc). However, I don't see much support for them in the PHP API. I'm also a Flash programmer and the Fl