• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
URL that gives the latest stable version of CI


I am wondering, is there any address, like for example codeigniter.com/version or codeigniter.com/latest, where one can get to know what the latest, stable version of CI is.

Of course everyone can just open the main page of CI Wink, but I'm interesting in a way, that can be used with cURL or wget, etc. Let's say, that I want to check with PHP if it's time to do an update of my CI.

The GitHub API can help with that, although you would have to parse the response and implement the logic so that it won't give you RC tags and such: https://developer.github.com/v3/repos/#list-tags

But Composer can manage that whole process for you already, so ...

Yes, I know Composer will do...
But I've been just curious.

If created a piece of code to check how GitHub API works. In case someone was interested (a CLI script):

PHP Code:
<?php /* get_latest_version.php */

function url_get_contents($url)
 $ch curl_init();
 $timeout 5/* seconds */
 $version curl_version();
 curl_setopt ($chCURLOPT_URL$url);
 curl_setopt ($chCURLOPT_RETURNTRANSFER1);
 curl_setopt ($chCURLOPT_CONNECTTIMEOUT$timeout);
 curl_setopt ($chCURLOPT_SSL_VERIFYPEERfalse);
 curl_setopt ($chCURLOPT_USERAGENT'cURL/'.$version['version']);
 $result curl_exec($ch);
 return $result;

 return version_compare($tag1['name'], $tag2['name']);

 $tags json_decode(

 if ($tags && empty($tags['message']))
   return end($tags);
   return $tags

$latest_tag get_latest_version_tag();
if (isset(
 echo $latest_tag['name'];
elseif (isset(
 echo $latest_tag['message'];
 echo 'Cannot retrieve the latest version of CodeIgniter.';


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.