Hi there folks, this problem is sincerely 'doing my head in'!
I want to know if there is a simpler method of achieving my aims set out below:
Script aim:
* To alert users subscribed to category's when new files are added to that category.
* A category has the same name as each directory in my projects' filesystem.
Proposed method (this is what I need a hand with)
* Subscribers emails are stored in table 'A' under their associated category. (Each
column name
reflects a category name)
* Subscribers are auto-emailed whenever a new file is added to their category
* A script is executed by cron that iterates through all categories at time 'X, once
every morning.
* The script gets current file numbers per directory and places this data into table
'B'.
* Another script, also executed by cron every evening at time 'Y' (after the script
above),
compares the value of files per directory from table 'B' to the *now* current number
of files in
each directory.
* It inserts these values into a another table 'C' and compares the totals in 'B' and
'C'.
* If the totals in 'C' are greater than those in 'B' then detect which category's have
had files
added and select emails from table 'A' where their subscribed categories = updated
categories.
* mail() these addresses with the message "Directory X has been updated"
Is this too contrived or is there an easier method? I already have various directory
recursion
scripts I got from phpbuilder, but the exact method of performing the above kinda
eludes me.
Any (constructive) comments more than welcome.
Kind regards:
Russ
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
e: [EMAIL PROTECTED]
w: www.apu.ac.uk/webteam
www.theruss.com
#-------------------------------------------------------#
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]