From cfa41edde2b886b5a8b88414e2f44b827084a5c5 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 10 Jan 2021 15:39:37 +0200 Subject: [PATCH] ggwave-to-file : update http service api --- examples/ggwave-to-file/ggwave-to-file.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/ggwave-to-file/ggwave-to-file.php b/examples/ggwave-to-file/ggwave-to-file.php index 7140236..cc35c47 100644 --- a/examples/ggwave-to-file/ggwave-to-file.php +++ b/examples/ggwave-to-file/ggwave-to-file.php @@ -2,12 +2,9 @@ $cmd = "ggwave-to-file"; -if (isset($_GET['p']) && $_GET['p'] == '0') { $cmd .= " -p0"; } -if (isset($_GET['p']) && $_GET['p'] == '1') { $cmd .= " -p1"; } -if (isset($_GET['p']) && $_GET['p'] == '2') { $cmd .= " -p2"; } -if (isset($_GET['p']) && $_GET['p'] == '3') { $cmd .= " -p3"; } -if (isset($_GET['p']) && $_GET['p'] == '4') { $cmd .= " -p4"; } -if (isset($_GET['p']) && $_GET['p'] == '5') { $cmd .= " -p5"; } +if (isset($_GET['s']) && is_int($_GET['s'])) { $cmd .= " -s".$_GET['s']; } +if (isset($_GET['v']) && is_int($_GET['v'])) { $cmd .= " -v".$_GET['v']; } +if (isset($_GET['p']) && is_int($_GET['p'])) { $cmd .= " -p".$_GET['p']; } $descriptorspec = array( 0 => array("pipe", "r"),