Skip to content

Commit 16c7e5d

Browse files
committed
Attempt to get over https, then http
Supress warnings with @ on https attempt Explode what we have afterwards
1 parent d5e6fb0 commit 16c7e5d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

index.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@
1010
$updateMsg = '';
1111
// Check for updates
1212
if ($ICEcoder["checkUpdates"]) {
13-
$icv_url = "http://icecoder.net/latest-version?thisVersion=".$ICEcoder["versionNo"];
13+
$icv_url = "https://icecoder.net/latest-version?thisVersion=".$ICEcoder["versionNo"];
1414
if (ini_get('allow_url_fopen')) {
15-
$icvInfo = explode("\n",file_get_contents($icv_url,false,$context));
15+
$icvInfo = @file_get_contents($icv_url,false,$context);
16+
if (!$icvInfo) {
17+
$icvInfo = file_get_contents(str_replace("https:","http:",$icv_url), false, $context);
18+
}
19+
$icvInfo = explode("\n",$icvInfo);
1620
} elseif (function_exists('curl_init')) {
1721
$ch = curl_init($icv_url);
1822
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

0 commit comments

Comments
 (0)