diff --git a/index.php b/index.php index afaeee9..235e602 100644 --- a/index.php +++ b/index.php @@ -13,18 +13,7 @@ $updateMsg = ''; // Check for updates if ($ICEcoder["checkUpdates"]) { $icv_url = "https://icecoder.net/latest-version?thisVersion=".$ICEcoder["versionNo"]; - if (ini_get('allow_url_fopen')) { - $icvInfo = @file_get_contents($icv_url,false,$context); - if (!$icvInfo) { - $icvInfo = file_get_contents(str_replace("https:","http:",$icv_url), false, $context); - } - $icvInfo = explode("\n",$icvInfo); - } elseif (function_exists('curl_init')) { - $ch = curl_init($icv_url); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $icvInfo = explode("\n", curl_exec($ch)); - } + $icvInfo = explode("\n", getData($icv_url,'curl')); $icv = $icvInfo[0]; $icvI = str_replace('"','\\\'',$icvInfo[1]); $thisV = $ICEcoder["versionNo"]; @@ -330,6 +319,8 @@ $t = $text['index'];