[Freeswitch-svn] [commit] r12216 - freeswitch/trunk/libs/esl/php
FreeSWITCH SVN
intralanman at freeswitch.org
Fri Feb 20 19:17:58 PST 2009
Author: intralanman
Date: Fri Feb 20 21:17:58 2009
New Revision: 12216
Log:
add single_command.php example
Added:
freeswitch/trunk/libs/esl/php/single_command.php (contents, props changed)
Added: freeswitch/trunk/libs/esl/php/single_command.php
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/esl/php/single_command.php Fri Feb 20 21:17:58 2009
@@ -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]);
+}
+
+?>
More information about the Freeswitch-svn
mailing list