Webcam plugin issue (caching image?)

Post Reply
aswigon
Newbie
Newbie
Posts: 8
Joined: Tue Nov 28, 2017 7:13 am
Location: Brisbane
Station model: Davis Pro 2
Software: Cumulus
Contact:

Webcam plugin issue (caching image?)

Post by aswigon » Sun Dec 03, 2017 8:52 am

Hoping someone can point me in the right direction with this challenge.

So I am having an issue with the webcam plugin not saving the current image at each interval. It seems to be keeping a copy of an older image even thought the current image shown at the top is current.

Appreciate any assistance provided.

Screenshots attached to give example of that I am seeing.

Screenshot at 18-51-25.png
Screenshot at 18-51-25.png (136.16 KiB) Viewed 2655 times
Screenshot at 18-51-02.png
Screenshot at 18-51-02.png (299.46 KiB) Viewed 2655 times
Image

aswigon
Newbie
Newbie
Posts: 8
Joined: Tue Nov 28, 2017 7:13 am
Location: Brisbane
Station model: Davis Pro 2
Software: Cumulus
Contact:

Re: Webcam plugin issue (caching image?)

Post by aswigon » Mon Dec 04, 2017 1:42 am

Okay so I have determined that the plugin update php is using a cached image. Not quite sure how it is happening since its a hosted server but I found a way around it by modifying the CRON updatewebcam.php file as follows:

Code: Select all

			$imageFile = file_get_contents($imageURL);
to

Code: Select all

			$imageFile = file_get_contents($imageURL.'?'.mt_rand());
This forces the URL to be different everytime and therefore obtains a clean (uncached) copy of the image.
Image

Post Reply