add single_command.php example
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12216 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
bbdf4744aa
commit
f4550d9e6e
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
require_once('ESL.php');
|
||||
|
||||
if ($argc > 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 <command>", $argv[0]);
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue