I'm working on a website for a client, in PHP/MySQL. They are a publisher, and the site needs to show whether the book you are looking at is in stock with their distributor.
The stock file is a CSV file on the distributor's FTP. This file is updated at a certain time every evening. So far I've written a script in PHP that copies the contents of the file to the web server. I'll then get the stock information from this and stick it in the MySQL books database.
Is there a way to make the file-transfer PHP script only run once a day, after the file has updated on the distributor's FTP? Is this the best way to do this?