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