Advertisement
citstudio

Check Update

Aug 28th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. public function checkupdate(){
  2.       // load library
  3.       $this->load->library('Ezyupdater');
  4.      
  5.       // declare new instance
  6.       $updater = new Ezyupdater();
  7.      
  8.       // init file
  9.       $updater->localVersion = 'versioning.txt';
  10.       $updater->remoteVersion = 'http://www.serveranda.com/versioning/versibaru.txt';
  11.      
  12.       // check latest version between local and remote
  13.       echo $updater->checkupdate('local');
  14.       echo $updater->checkupdate('remote');
  15.     }
  16.    
  17.     public function update(){
  18.       // load library
  19.       $this->load->library('Ezyupdater');
  20.      
  21.       // declare new instance
  22.       $updater = new Ezyupdater();
  23.      
  24.       // pulling from git
  25.       $updater->doUpdate();
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement