1
0
Fork 0
mirror of https://github.com/fernwerker/ownDynDNS.git synced 2025-07-09 21:55:13 +02:00
ownDynDNS/update.php
Branko Wilhelm 05e326abe6
* rewrite the hole script:
** use .env file for config so we can retrieve updates
** add config and payload DTO with validators
** allow registrable domains as DynDNS
** update IPv4/6 only if changed (or really forced)
** remove obsolete failed_logins counter
** save logs with timestamp
** save only the newest 100 log entries for each domain
2019-05-16 18:00:21 +02:00

20 lines
511 B
PHP
Executable file

<?php
error_reporting(-1);
ini_set('display_errors', 1);
ini_set('html_errors', 0);
header('Content-Type: text/plain; charset=utf-8');
require_once __DIR__ . '/src/Soap.php';
require_once __DIR__ . '/src/Config.php';
require_once __DIR__ . '/src/Payload.php';
require_once __DIR__ . '/src/Handler.php';
if (!file_exists('.env')) {
throw new RuntimeException('.env file missing');
}
$config = parse_ini_file('.env', false, INI_SCANNER_TYPED);
(new netcup\DNS\API\Handler($config, $_REQUEST))->doRun();