I have a hobby weather website that I recently moved from HostGator web hosting to Hostinger web hosting. Everything works well at the new host with the exception of my webcam. The cam page on the website uses a script that pulls a static image from my camera, displays it, and then updates it every 1 seconds... this worked very well with the old hosting and fails with the new hosting. I'm a complete dunce when it comes to coding and don't know how to fix this issue. I do suspect however that the issue is the way SSL is forced for everything on my new host. The URL the script is pulling from my camera is: http://172.100.163.136/webcapture.jpg?command=snap&channel=1&user=viewer&password
That URL works in a browser as http but not https
Here's the script I'm using:
<script type="text/javascript">
// <![CDATA[
var refreshrate = 1; // seconds between refresh
var image = "http://172.100.163.136/webcapture.jpg?command=snap&channel=1&user=viewer&password"; // image name
var imgwidth = 665; // image width
var imgheight = 374; // image height
var imgalt = "WebCam Image";
var imgtitle = "header=[WebCam Image] body=[WebCam Image Automatically Updated Every 1-2 Seconds] delay=[500]";
function refresh() { document.images["pic"].src = image + "?" + new Date(); setTimeout('refresh()', refreshrate * 500); }
document.write('<img src="' + image + '" alt="' + imgalt + '" title="' + imgtitle + '" name="pic" id="pic" width="' + imgwidth + '" height="' + imgheight + '" style="border:1px dashed gray;"/>');
if(document.images)window.onload=refresh;
// ]]>
</script>
Does anyone have an idea on how to fix this?
OK, I found the solution... The new host was "forcing" https with the let's encrypt SSL solution. I was able to change a setting to end forcing https but yet leave SSL intact. Webcam working again!