Hi,
I have written a PHP script to auto generate images from a specified directory for a simple gallery. This works well but what I want to do is add a search feature. This is what I intend to do:
Load path to image, image description and tags from IPTC data into a DB. Then search the tags or keywords from the db and write the path. The problem though is how do I trigger a DB update when a new image is placed in the directory? Is there any way to detect if a folders contents change? If so, then I could probably trigger a cron job to update the image db.
I don't want to have to do anything manually once this is coded so that the user can just upload files and the rest will be done automatically.
Thanks in advance.
I have written a PHP script to auto generate images from a specified directory for a simple gallery. This works well but what I want to do is add a search feature. This is what I intend to do:
Load path to image, image description and tags from IPTC data into a DB. Then search the tags or keywords from the db and write the path. The problem though is how do I trigger a DB update when a new image is placed in the directory? Is there any way to detect if a folders contents change? If so, then I could probably trigger a cron job to update the image db.
I don't want to have to do anything manually once this is coded so that the user can just upload files and the rest will be done automatically.
Thanks in advance.