-1

I would like to ask, how to get some content from some page in some intervals. I know how to use CUrl to get content but dont know how to make time loop that will repeat CUrl for example every one hour to check if there is some new content. If you know about some tutorial it would be great.

Thanks for help

Zub27
  • 61
  • 1
  • 1
  • 5
  • 1
    You need to look into scheduling. If it's linux based, research cron. – Ian P Nov 10 '15 at 16:56
  • Make a simple PHP script that retrieves the content from the URL, then call that script everyday with a cron job. If you're using cPanel you can configure reading this documentation: https://documentation.cpanel.net/display/ALD/Cron+Jobs – Saruva Nov 10 '15 at 16:56

1 Answers1

3

You will want to take advantage of CRON to accomplish this. Essentially create a function/method to make your curl request. Then have the CRON job handle the every hour part.

This article may help.

Community
  • 1
  • 1
Chris
  • 4,762
  • 3
  • 44
  • 79