|
Monitor directory and email
Hello all,
Can anyone please guide / help me in the following task....
I have a directory where some external users will upload pdf files. The filename of these pdf will be of a particular format (<id>-<first name>_<last name>_<some number>.pdf)
I want to make a script such that it takes (splits) the id from the filename and query the mysql database for the email address of that id (this can be done from a php script also) and then email on that particular id. Also this script has to run periodically (many times in a day...this can be done from cron).
I need some guidance on how to go about this.....whether this can be done from a shell script or php script and some help with the commands if shell script. My knowledge on PHP also is not very good, so if there are any inputs for using php then just guide me along.
Thanks....
|