Forum Moderators: open
Does anyone know how I could import every item from an XML feed into a MySQL table and then have the items automatically delete after 24 hours, and if I imported another XML feed, it wouldn't replace the existing items but add to it (and wouldn't add duplicates)?
I would like to do all of this with PHP.
Thanks if you can help or point me the correct direction.
Set up a cron job (crontab -e on linux) or use the windows scheduler.
Using PHP/MySQL, delete any existing items older than 24 hours.
[us2.php.net...]
Parse the XML with PHP:
[us2.php.net...]
Insert new data into MySQL (first check if each item exists, if it does then do not insert).
Have your scheduler run this at least every 24 hours to remove old items.