Weather icons and temperature not showing when am using https (SSL) why ?

  • 1
  • Problem
  • Updated 3 years ago
  • (Edited)
Recently i change my website from http to https using SSL.

But after that i discover that weather icons and temperature was not appering any more... why this hapenned ?

We can use https with the API ? I dont want to use http links (cause am getting from all browsers Mixed Content!!!), instead i tried with https but did not work and then i tried with relative path but again is not working.

Below is the php code am using:

$json_string = file_get_contents("//");
$parsed_json = json_decode($json_string);
$location = $parsed_json->{'location'}->{'city'};
$icon = $parsed_json->{'current_observation'}->{'icon'};
$temp_c = $parsed_json->{'current_observation'}->{'temp_c'};
echo "Weather conditions: ${temp_c} C \n"; 

Any help to solve this problem please !?
Photo of Weatherps


  • 4 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1

Be the first to post a reply!