Event-API und randomimage hinzugefügt

This commit is contained in:
R40fendt
2025-04-16 21:55:25 +02:00
parent adb4809405
commit 5bd5fcb02c
4 changed files with 316 additions and 0 deletions

28
get_events.php Executable file
View File

@@ -0,0 +1,28 @@
<?php
header("Access-Control-Allow-Origin: *");
include("../mysqlverbinden.php");
include("rowforeach.php");
$result=[];
foreach(srowforeach("SELECT * from `ritzenbergen-events`",[]) as $key => $value){
$id=$value[0];
$eventname=$value[1];
$datum=$value[2];
$type=$value[3];
$content=$value[4];
$link=$value[5];
$foto=$value[6];
array_push($result,[
"id" => $id,
"eventname" => $eventname,
"datum" => $datum,
"type" => $type,
"content" => $content,
"link" => $link,
"foto" => $foto
]);
}
echo json_encode($result,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);