diff --git a/src/ckdb.php b/src/ckdb.php new file mode 100644 index 00000000..b0c1a771 --- /dev/null +++ b/src/ckdb.php @@ -0,0 +1,93 @@ + 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"; + } +} +?>