使用 PHP 显示 Icecast2 统计数据
我在使用 PHP 查看统计数据(观众、当前播放的歌曲等)时遇到一些问题,并且找不到任何如何执行此操作的信息。
Icecast2 中包含几个 XLS 文件,我可以使用 PHP 将此文件包含到我的网站中,但我不想更新包含每 5 秒一次的 DIV,并且不适用于 XLS 文件。
谢谢!
I have some trouble viewing statistics (viewers, current song playing etc) with PHP and I can't find any information how to do this.
There is a couple of XLS files included with Icecast2 and I could include this files with PHP to my site but I wan't to update the DIV that the include is in every 5 seconds and that won't work with XLS files.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您好,感谢您的代码。
我用它创建了一个类并添加了一些检查,这样当服务器离线时它就不会抱怨。
因为我从这里拿走它,所以我将分享该课程:
Hi there and thanks for the code.
I made a class from it and added some checks so it doesn't complain when the server is offline.
Since I took it from here I will share the class back:
通过使用这段代码,我已经让它工作了:
By using this code I've got it working:
请查看我的回答这里 为什么使用这个脚本是一个非常糟糕的主意。
tl;dr:您不应该解析 Icecast HTML 状态页面。
Please take a look at my answer over here why it is a very bad idea to use this script.
tl;dr: You should not parse the Icecast HTML status page.