my system uses a XML file generated by a URL and I need a script that every 30 minutes access that URL (https://www.shopfisio.com.br/feeds/teste-leo?download=true), and download the file to my server directory.
Can somebody help me how to do this?
my system uses a XML file generated by a URL and I need a script that every 30 minutes access that URL (https://www.shopfisio.com.br/feeds/teste-leo?download=true), and download the file to my server directory.
Can somebody help me how to do this?
2
Answers
In a simple case you can use following code:
For scheduling execution of your script you might use cron.
You can create a cron job entry that run a script every 30 minutes. In the script you should use CURL, Or just use package like guzzle to create a request to the url and save the returning body into a file on your server by one of read&write like file_put_contents files functions in php, hope thats help you.