From f4550d9e6ed69a22e2ba8d222f80ff615a14017c Mon Sep 17 00:00:00 2001 From: Raymond Chandler Date: Sat, 21 Feb 2009 03:17:58 +0000 Subject: [PATCH] add single_command.php example git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12216 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/esl/php/single_command.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 libs/esl/php/single_command.php diff --git a/libs/esl/php/single_command.php b/libs/esl/php/single_command.php new file mode 100755 index 0000000000..76d83bc8de --- /dev/null +++ b/libs/esl/php/single_command.php @@ -0,0 +1,17 @@ +#!/usr/bin/php + 1) { + array_shift($argv); + $command = sprintf('%s', implode(' ', $argv)); + printf("Command to run is: %s\n", $command); + + $sock = new ESLconnection('localhost', '8021', 'ClueCon'); + $res = $sock->api($command); + printf("%s\n", $res->getBody()); +} else { + printf("ERROR: You Need To Pass A Command\nUsage:\n\t%s ", $argv[0]); +} + +?>