Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Use cURL for version check if allow_url_fopen is disabled #210

merged 2 commits into from

2 participants


ICEcoder gave an error message on a server where allow_url_fopen is disabled. And it didn't notify about a new version. This change adds cURL support as an alternative.


@mbirth This looks like a great idea, tho setting the URL in a var and using that would be better than having it hardcoded twice and save a few bytes?


You mean like this? ;)


Perfect! Many thanks :)

@mattpass mattpass merged commit c1549fa into mattpass:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 1 deletion.
  1. +8 −1 index.php
9 index.php
@@ -8,7 +8,14 @@
$updateMsg = '';
// Check for updates
if ($ICEcoder["checkUpdates"]) {
- $icv = explode("\n",file_get_contents("".$ICEcoder["versionNo"]));
+ $icv_url = "".$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('<b>UPDATE INFO:</b> ICEcoder v ".$icv." now available. (Your version is v ".$ICEcoder["versionNo"]."). Get it free from <a href=\\'\\' target=\\'_blank\\' style=\\'color:#ddd\\'></a>');";
Something went wrong with that request. Please try again.