1) { if ($argv[1] == '-?' || $argv[1] == '-h' || $argv[1] == '-help' || $argv[1] == '--help') usAge($argv[0]); $a = 1; if ($argv[$a] == '-t') { $tabs = false; $a++; } $socket_name = $argv[$a++]; if (count($argv) > $a) { $socket_dir = $argv[$a++]; if (count($argv) > $a) $socket_file = $argv[$a]; } } # while ($line = fgets(STDIN)) { $line = trim($line); if (strlen($line) > 0) { $rep = msg($line, $tabs); if ($rep === false) echo "Failed\n"; else echo "$rep\n"; } } ?>