From: Raymond Chandler Date: Sat, 21 Feb 2009 03:17:58 +0000 (+0000) Subject: add single_command.php example X-Git-Tag: v1.0.4~1884 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4550d9e6ed69a22e2ba8d222f80ff615a14017c;p=thirdparty%2Ffreeswitch.git add single_command.php example git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12216 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- 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]); +} + +?>