require 'dibi.phar';
// vi .kodi/userdata/addon_data/service.libreelec.settings/oe_settings.xml
// $HOME/.kodi/temp/kodi.log
dibi::connect([
'driver' => 'mysqli',
'host' => 'localhost',
'username' => 'kodi',
'password' => 'qREQPw49fh7tzaeh',
'database' => 'kodi',
]);
$arr = [
'ip' => $_SERVER['REMOTE_ADDR'],
'datum' => new DateTime(),
];
dibi::query('INSERT INTO [kodiLog]', $arr);
$all=[
["name"=>"Amlogic S905","url"=>"s905/8.2","arch"=>"S905.arm"],
["name"=>"Amlogic S805","url"=>"s805","arch"=>"S805.arm"],
["name"=>"Amlogic S912","url"=>"s912","arch"=>"S912.arm"],
];
//print_r($files);
?>{
"LibreELEC-8.0": {
"url": "http://sx05.eu/",
"prettyname_regex": "^[0-9a-z]*\\/[0-9a-z.]*\\/LibreELEC-.*-([0-9]+\\.[0-9]+\\.[^.]*)",
"project": {
foreach($all as $one){
$c=file_get_contents ("http://sx05.eu/".$one["url"]."/?C=M;O=A");
$versions=[];
preg_match_all("/[0-9]+\.+[0-9]+\.+[0-9][0-9]?[a-z]?-?[a-z]*/", $c, $versions);
//print_r($versions);
$last=end($versions[0]);
$c=file_get_contents ("http://sx05.eu/".$one["url"]."/".$last."/");
preg_match_all("/LibreELEC[-_.0-9a-zA-Z]*\"/", $c, $files);
$files=$files[0];
if($one!=$all[0])echo ",";
?>
"
Warning: Undefined variable $one in /var/www/kodi/updateAll.php on line 44
Warning: Trying to access array offset on value of type null in /var/www/kodi/updateAll.php on line 44
": {
"displayName": "
Warning: Undefined variable $one in /var/www/kodi/updateAll.php on line 45
Warning: Trying to access array offset on value of type null in /var/www/kodi/updateAll.php on line 45
",
"releases": {
"
Warning: Undefined variable $i in /var/www/kodi/updateAll.php on line 48
": {
"image": {
"sha256": "9a47f4c49f558ef24b4f49262b4e3565011c85a8b9a67aa583fcbc4f4e87e35b",
"name": "
Warning: Undefined variable $one in /var/www/kodi/updateAll.php on line 51
Warning: Trying to access array offset on value of type null in /var/www/kodi/updateAll.php on line 51
/
Warning: Undefined variable $last in /var/www/kodi/updateAll.php on line 51
/
Warning: Undefined variable $i in /var/www/kodi/updateAll.php on line 51
Warning: Undefined variable $files in /var/www/kodi/updateAll.php on line 51
Warning: Trying to access array offset on value of type null in /var/www/kodi/updateAll.php on line 51
,
"size": "122548364"
},
"file": {
"sha256": "964e0928dca8660dfe35e6642b4cb7b94aadc41807106fbea4da6d1ad7a91a08",
"name": "
Warning: Undefined variable $one in /var/www/kodi/updateAll.php on line 56
Warning: Trying to access array offset on value of type null in /var/www/kodi/updateAll.php on line 56
/
Warning: Undefined variable $last in /var/www/kodi/updateAll.php on line 56
/
Warning: Undefined variable $i in /var/www/kodi/updateAll.php on line 56
Warning: Undefined variable $i in /var/www/kodi/updateAll.php on line 56
Warning: Undefined variable $files in /var/www/kodi/updateAll.php on line 56
Warning: Trying to access array offset on value of type null in /var/www/kodi/updateAll.php on line 56
,
"size": "135639040"
}
}
}?>
}
}
}?>
}
}
}