20 lines
		
	
	
	
		
			653 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			653 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, $_SERVER['argc'] > 2 ? $_SERVER['argv'][2] : null);
 | 
						|
$main->run($_SERVER['argv'][1]);
 |