0

Have a user that would like to copy city webcam images showing day by day construction of their building, then house those copied images on their WordPress site.

The URL is always the same http://www.example.com/cam_image.jpg

Can a cron job do something like this on an hourly basis?

Maybe a PHP file run hourly like the following:

// Remote image URL
$url = 'http://www.example.com/cam_image.jpg';
// Image path
$img = 'images/cam_image'+datetimestamp+'.jpg';
// Save image 
file_put_contents($img, file_get_contents($url));
Bob
  • 5,805
  • 7
  • 25

0 Answers0