diff --git a/index.php b/index.php
index 698cf0a..b4ea254 100644
--- a/index.php
+++ b/index.php
@@ -8,7 +8,14 @@ if (!in_array($_SERVER["REMOTE_ADDR"], $_SESSION['allowedIPs']) && !in_array("*"
$updateMsg = '';
// Check for updates
if ($ICEcoder["checkUpdates"]) {
- $icv = explode("\n",file_get_contents("http://icecoder.net/latest-version?thisVersion=".$ICEcoder["versionNo"]));
+ $icv_url = "http://icecoder.net/latest-version?thisVersion=".$ICEcoder["versionNo"];
+ if (ini_get('allow_url_fopen')) {
+ $icv = explode("\n",file_get_contents($icv_url));
+ } elseif (function_exists('curl_init')) {
+ $ch = curl_init($icv_url);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ $icv = explode("\n", curl_exec($ch));
+ }
$icv = $icv[0];
if ($ICEcoder["versionNo"]<$icv) {
$updateMsg = ";top.ICEcoder.dataMessage('UPDATE INFO: ICEcoder v ".$icv." now available. (Your version is v ".$ICEcoder["versionNo"]."). Get it free from icecoder.net');";