Welcome Guest, Not a member yet? Register   Sign In
Version/System update notifications
#1

Hi folks,

Is there any way I can receive notifications (perhaps via email) when there is a CI system update?

Thanks.
Reply
#2

I believe that there is an RSS channel, you would need to ask the administrator for the link.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(08-21-2017, 01:30 AM)n2fole00 Wrote: Hi folks,

Is there any way I can receive notifications (perhaps via email) when there is a CI system update?

Thanks.

https://github.com/bcit-ci/CodeIgniter/releases.atom
Reply
#4

(This post was last modified: 08-21-2017, 09:19 AM by n2fole00.)

(08-21-2017, 02:45 AM)Paradinight Wrote: https://github.com/bcit-ci/CodeIgniter/releases.atom

Thanks, I made this little script to keep me updated.

PHP Code:
<?php

/** 
 * Check CodeIgniter release for updates - Run as a cron job
 */

$local_version_file 'ci_version.txt'
if(!
file_exists($local_version_file)) { file_put_contents($local_version_file''); } // create for first run

$update_feed_address 'https://github.com/bcit-ci/CodeIgniter/releases.atom';
$xmlstr file_get_contents($update_feed_address);
$feed = new SimpleXMLElement($xmlstr);
$latest_version  $feed->entry[0]->id;

$file_contents file_get_contents($local_version_file); 
if(empty(
$file_contents)) { file_put_contents($local_version_file$latest_version); } // empty on first run 

if(strcmp($latest_version$file_contents) !== 0) { 
 
   // Release versions not matched - therefore new version available. Send notification 
 
   $to "[email protected]";
 
   $subject "CodeIgniter Update Available";
 
   $txt "There is a CodeIgniter update available. Version: " $latest_version;
 
   $headers "From: [email protected]"\r\n"// . "CC: [email protected]";

 
   if(!mail($to,$subject,$txt,$headers)) { echo "Failed to send mail."; } 
    
    
file_put_contents($local_version_file$latest_version); // add the latest version back to the local datastore 

Reply




Theme © iAndrew 2016 - Forum software by © MyBB