This is my version of this plugin
PHP Code:
$link_parsed = parse_url($link);
if( $link_parsed['scheme'] == 'http'){
$ssl = 'https://'.$link_parsed['host'];
$stream = @stream_context_create (array("ssl" => array("capture_peer_cert" => true)));
$read = @fopen($ssl, "rb", false, $stream);
$cont = @stream_context_get_params($read);
$var = ($cont["options"]["ssl"]["peer_certificate"]);
$result = (!is_null($var)) ? true : false;
if($result) {
$link = str_replace('http','https',$link);
$retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link . '" border="0" alt="" />' . ($fullsize ? '</div>' : '');
} else {
$link = $this->registry->options['bburl'] . '/cache.php?img=' . urlencode($link);
$retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link . '" border="0" alt="" />' . ($fullsize ? '</div>' : '');
}
}
it checks if image https => OK
if image http .. check for https version .. if the https version is OK => OK
if the https version not working .. use the script