在linux下执行脚本文件 /usr/local/php/bin/php /usr/local/www/test.php ,这里输出的数据可以传到另外一个php页面
$options = array(
'host' => '172.0.0.1',
'scheme' => 'tcp://',
'port' => 5038,
'username' => 'test',
'secret' => 'test',
'connect_timeout' =>10000,
'read_timeout' => 10000
);
$client =new ClientImpl($options);
$client->open();
$client->registerEventListener(function (EventMessage $event) {
var_dump($event);
},function (EventMessage $event) {
return $event instanceof NewchannelEvent;
}
);
$running = true;
while($running) {
echo $callid;
$client->process();
usleep(10000);
}
$options = array(
'host' => '172.0.0.1',
'scheme' => 'tcp://',
'port' => 5038,
'username' => 'test',
'secret' => 'test',
'connect_timeout' =>10000,
'read_timeout' => 10000
);
$client =new ClientImpl($options);
$client->open();
$client->registerEventListener(function (EventMessage $event) {
var_dump($event);
},function (EventMessage $event) {
return $event instanceof NewchannelEvent;
}
);
$running = true;
while($running) {
echo $callid;
$client->process();
usleep(10000);
}
解决方案 »
- 跟着书本做,有点想不明白@
- php mysql大类读取下级类SQL语句求助
- linux(centos6.0)如何设置上网呀,thanks
- 输出图像 删去浏览器缓存的问题
- syntax error, unexpected '[', expecting ']'什么错误?
- php url 跳转问题,url含参数,可能需要正则
- ASP站点转为PHP!有接兼职的进!
- 使用fckeditor时,图片无法上传问题,用过的朋友看看怎么回事?
- 请问这个错误提示是什么意思?怎么解决??
- php使用laravel框架,访问时403错误,根目录定位到public就可以访问了,为什么呢?求解答,谢谢
- hosts文件的小问题
- 抓取的网页如何存入mysql数据库
resource fsockopen ( string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout") ]]]] )