mirror of
https://github.com/p1neappleXpress/OpenFlux.git
synced 2026-10-20 06:11:02 +08:00
The exit is a small PHP program on an ordinary web hosting, reached through cups.online or Mail.ru. See the PR for the list.
12 lines
425 B
PHP
12 lines
425 B
PHP
<?php
|
|
// Test helper: writes endless data to whoever connects (a bulk download). php sendserver.php <port>
|
|
[$_, $port] = $argv;
|
|
$srv = stream_socket_server("tcp://127.0.0.1:$port", $e, $es) or exit(1);
|
|
echo "ready\n";
|
|
$chunk = str_repeat('x', 65536);
|
|
while ($c = @stream_socket_accept($srv, 30)) {
|
|
$until = microtime(true) + 6;
|
|
while (microtime(true) < $until && @fwrite($c, $chunk) !== false) { }
|
|
@fclose($c);
|
|
}
|