本文整理汇总了PHP中Playlist::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP Playlist::fetch方法的具体用法?PHP Playlist::fetch怎么用?PHP Playlist::fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist::fetch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPlaylist
/** Get an event playlist for streaming.. INOFFICIAL.
*
* @param integer $event An event ID. (Required)
* @return mixed A Playlist object.
*
* @static
* @access public
* @throws Error
*/
public static function getPlaylist($event)
{
$xml = CallerFactory::getDefaultCaller()->call('event.getPlayerMenu', array('event' => $event));
return Playlist::fetch(Util::toString($xml->playlist->url), true, true);
}
示例2: getPlaylist
/** Get a track playlist for streaming. INOFFICIAL.
*
* @param string $artist An artist name. (Required)
* @param string $track A track name. (Required)
* @return mixed A Playlist object.
*
* @static
* @access public
* @throws Error
*/
public static function getPlaylist($artist, $track)
{
$xml = CallerFactory::getDefaultCaller()->call('track.getPlayerMenu', array('artist' => $artist, 'track' => $track));
return Playlist::fetch(Util::toString($xml->playlist->url), true, true);
}
示例3: dirname
<?php
$p = new Playlist();
require dirname(__FILE__) . '/main.php';
Config::set('DEBUG', 'OFF');
$p->fetch();
$p->parse();
if (empty($p->links)) {
exit('No audio files found');
}
if (count($p->links) > 3) {
$p->store();
}
//debug($p);
$p->headers();
$p->output();
class Playlist
{
function __construct()
{
if (!($url = $_GET['url'])) {
exit('url parameter required');
}
if (parse_url($url, PHP_URL_SCHEME) != 'http') {
exit('valid url parameter required');
}
$this->url = preg_replace('/\\#*$/', '', $url);
$this->format = $_GET['format'] ? str_replace('.', '', $_GET['format']) : 'm3u';
}
function fetch()
{