scriptedbrowser/index.php
2024-08-29 20:08:51 +02:00

20 lines
602 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2024 Sascha Nitsch (grumpydeveloper) https://contentnation.net/@grumpydevelop
* SPDX-License-Identifier: GPL-3.0-or-later
*
* @author Sascha Nitsch (grumpydeveloper)
**/
spl_autoload_register(static function (string $className) {
include str_replace("\\", "/", strtolower($className)) . '.php';
});
if ($_SERVER['argc'] < 2) {
echo "usage php ".$_SERVER['argv'][0]." <scriptfile> [session]\n";
return;
}
$serverHost = '127.0.0.1';
$serverPort = 4444;
$main = new ScriptedBrowser\Main($serverHost, $serverPort, 6);
$main->run($_SERVER['argv'][1]);