Today I will introduce you a simple and quick way to display all over our site as long as it took for the page that I entered to upload.
In order to load any non-https image on a https site without having any problems with our site being secure but containing non-ssl elements I will introduce a php code that helped me a lot.
The code is simple. Before the URL that we want to do https add the script address.
The code is the following:
<?php
error_reporting(0);
if(isset($_GET['adresa'])) {
if(filter_var(strip_tags($_GET['adresa']), FILTER_VALIDATE_URL)) {
$date_adresa = getimagesize($_GET['adresa']);
header("Content-type: {$date_adresa['mime']}");
readfile($_GET['adresa']);
}
}
?>