Exemple #1
0
 function __construct()
 {
     //parent::__construct($login,$pass);
     $login = func_get_arg(0);
     $pass = func_get_arg(1);
     parent::__construct($login, $pass);
 }
<?php

require_once 'config.php';
require_once 'identica.php';
$dent = new Identica(USER, PASS, 'RaumZeitStatus');
$status = file_get_contents('http://status.raumzeitlabor.de/api/simple');
switch ($status) {
    case 0:
        $text = "RaumZeitLabor ist nun geschlossen.";
        break;
    case 1:
        $text = "RaumZeitLabor ist nun geoeffnet.";
        break;
}
$nbr = file_get_contents("nbr");
echo "nbr = " . $nbr . " - status " . $status;
if ($text and $nbr != $status) {
    $dent->updateStatus($text, array('lat' => 49.507918, 'long' => 8.499529000000001));
    $datei = fopen("nbr", "w");
    fwrite($datei, $status);
    fclose($datei);
}