PHP Curl script to pull data from remote server every 10 minutes

前端 未结 3 1118
情深已故
情深已故 2021-01-25 21:27

I\'m trying to create a PHP script which pulls xml data (text and images) from a remote server and inserts it in a local database. I need to run this script every 10 minutes or

3条回答
  •  甜味超标
    2021-01-25 22:00

    You can create a run of the mill curl script that connects to a remote server and fetches data, inserts into your db, set limits and exceptions. Then create an entry in crontab to run this script every 10 minutes. I have a similar setup running for one of my website which fetches data from stock exchange and updates a local cache, another script has the task of consuming the cache as and when required.

提交回复
热议问题