mahlstrom / icecast
从 IceCast 服务器获取信息
v1.0.0
2017-02-08 00:07 UTC
Requires
- php: >=5.0.0
This package is not auto-updated.
Last update: 2024-09-29 00:16:52 UTC
README
一个简单的类,用于解析 status.xsl 并将流数据作为对象返回。
安装
composer require mahlstrom/icecast
示例
<?php
require_once 'vendor/autoload.php';
$streams=new \mahlstrom\IceCast\IceCastStatus('127.0.0.1:8000');
print_r($streams);
输出
mahlstrom\IceCast\IceCastStatus Object
(
[streams] => Array
(
[0] => mahlstrom\IceCast\IceCastStream Object
(
[name] => pop_radio_aacp
[streamTitle] => pop_radio
[contentType] => audio/aacp
[mountStart] => 31/Jan/2017:01:29:38 +0100
[bitrate] => 64
[currentListeners] => 0
[peakListeners] => 0
[streamGenre] => -
[currentSong] => RIHANNA - RUSSIAN ROULETTE
)
)
)