예제 #1
0
 public static function append($id, $msg)
 {
     // blockieren
     Semphore::p();
     $counter = Globals::get('counter', 0);
     $counter++;
     Globals::put('counter', $counter);
     $textToAdd = $counter . ";" . $id . ";" . time() . ";" . $msg . PHP_EOL;
     $myfile = fopen(self::FILE, "a") or die("Unable to open file!");
     fwrite($myfile, $textToAdd);
     fclose($myfile);
     // freigeben
     Semphore::v();
 }
예제 #2
0
파일: IPs.php 프로젝트: xoo-berlin/janilein
 public static function add($ip)
 {
     $allIPs = Globals::get('ips', '');
     $allIPs = $allIPs . ";" . $ip;
     Globals::put('ips', $allIPs);
 }
예제 #3
0
 public static function update($ipString)
 {
     Globals::put('neighbor', $ipString);
     // return current neighbor ip
     return self::get();
 }
예제 #4
0
 public static function server()
 {
     Globals::put(ROLE, SERVER);
 }
예제 #5
0
 public static function update($name)
 {
     Globals::put('group', $name);
     // return current name
     return self::get();
 }
예제 #6
0
 public static function add($ip)
 {
     $allIPs = Globals::get(NAME, '');
     $allIPs = $allIPs . DIVISOR . $ip;
     Globals::put(NAME, $allIPs);
 }