Пример #1
0
}
if (@$_GET['phpinfo'] == 'yes') {
    phpinfo();
    exit;
}
function runServer()
{
    $WshShell = new COM("WScript.Shell");
    if (!file_exists('server.cmd')) {
        fwrite(fopen('server.cmd', 'w'), 'start C:\\xampp\\php\\php.exe ' . getcwd() . '\\server.php');
    }
    $WshShell->Run(getcwd() . '\\server.cmd', 7, false);
}
if (PHP_SAPI != 'cli') {
    if (@$_POST['server'] == 'run') {
        runServer();
    }
    //DEBUG ALL ACCESS //elseif (@$_POST['server'] == 'logout') { session_destroy(); header("Location: http://server.hovel.me:8350/hovelme/?page=experiment"); exit(); }
    echo '<!DOCTYPE html><html lang="en-US"><head><title>#### HovelMe Server Backend ####</title>';
    ?>
        <style type="text/css">
            body { background: #CCC; margin: 16px 0; }
            
            #log { width: 608px; height: 320px; background: #000; color: #FFF; font-family: Courier New, monospace; font-size: 11px;
                    overflow-x: hidden; overflow-y: scroll; float: left; }
            #log .ts { color: #999; }
            
            #display { width: 384px; height: 240px; background: #000; }
            #displayLog { font-family: Courier New, monospace; font-size: 12px; width: 384px; height: 96px; background: #000; }
            
            #data { font-family: Courier New, monospace; font-size: 11px; width: 310px; height: 320px; background: #000;
Пример #2
0
function runServerForever()
{
    runServer(true);
}