Hello, wondering if anyone has experinced the same issue. have googled this but nothing of significance comes up.

I have this code in a number of websites to convert an address into co-ordinates.

PHP Code:
<?php
$SiteMapAPI 
'xxxx';
          
$VenueMap2 "HU1 3AL United Kingdom";
          
$VenueMap2 str_replace(" ","+",$VenueMap2);

        function 
getLnt($zip){
                global 
$VenueMap2;
                global 
$SiteMapAPI;
                
$url "https://maps.googleapis.com/maps/api/geocode/json?address=$VenueMap2&sensor=false&key=$SiteMapAPI";
                
$result_string file_get_contents($url);
                
$result json_decode($result_stringtrue);
                
$result1[]=$result['results'][0];
                
$result2[]=$result1[0]['geometry'];
                
$result3[]=$result2[0]['location'];
                return 
$result3[0];
            }
 
            
$val getLnt('90001');
            
$center_lat $val['lat'];
            
$center_lng $val['lng'];
            
            echo 
"<p>1Lat:  $center_lat</p>\n";
            echo 
"<p>Lng:  $center_lng</p>\n";
?>
However, just recently, ive noticed that when one of the website has an SSL certificate installed (so works under https) the code stops working and doesnt return co-ordinates.

Any ideas?