I am trying to set up the following interface between websites:
1) Other websites will upload (xml) files on my webserver via FTP on a specific folder
2) My website will scan the folder for new files and will import them immediately after they have been uploaded
2a) Ideally the scan is triggered after a new file is uploaded in FTP, but I do not know how to do this. Is this possible?
2b) Alternatively, I use cron to scan the folder every second, but I think this will use a lot of resources.
3) After the (xml) file has been detected, it will be automatically imported in the mySQL database.
I just cant find any help on using the scan for new file trigger. I am using PHP, PHP my admin and Drupal. Are these tools sufficient or should I have something else?