federator/htdocs/api.php

21 lines
571 B
PHP
Raw Normal View History

2024-07-15 20:46:44 +02:00
<?php
/**
* SPDX-FileCopyrightText: 2024 Sascha Nitsch (grumpydeveloper) https://contentnation.net/@grumpydevelop
* SPDX-License-Identifier: GPL-3.0-or-later
*
* @author Sascha Nitsch (grumpydeveloper)
**/
if (! array_key_exists('_call', $_REQUEST)) {
http_response_code(404);
exit();
}
date_default_timezone_set("Europe/Berlin");
2024-07-17 21:37:02 +02:00
spl_autoload_register(static function (string $className) {
2024-07-15 20:46:44 +02:00
include '../php/' . str_replace("\\", "/", strtolower($className)) . '.php';
});
/// main instance
$contentnation = new \Federator\Api();
$contentnation->run();