Ejemplo n.º 1
0
function getInfo($stream)
{
    if (!$stream['info']['song']) {
        $stream['info']['song'] == 'Not found';
        return $stream;
    }
    if (GET_TRACK_INFO == TRUE) {
        $stream = getTrackInfo($stream);
    }
    if (GET_ALBUM_INFO && isset($stream['album']['title'])) {
        $stream = getAlbumInfo($stream);
    }
    if (GET_ARTIST_INFO == TRUE) {
        $stream = getArtistInfo($stream);
    }
    if (GET_TRACK_BUY_LINK == TRUE) {
        $stream = getTrackBuyLink($stream);
    }
    if (CACHE_ALBUM_ART == TRUE) {
        $stream['album']['local_image'] = cacheAlbumArt($stream['album']['image_l']);
    }
    if (GET_LYRICS == TRUE) {
        $stream['track']['lyric'] = getLyric($stream['info']['artist'], $stream['info']['song']);
    }
    $stream['fetch_time'] = time();
    return $stream;
}
Ejemplo n.º 2
0
foreach ($salesArray as $key => $sale) {
    $items_sold_old = explode('#', trim($sale['itemArray'], "#"));
    $items_sold = array_map('strtoupper', $items_sold_old);
    $prices = explode('#', trim($sale['priceArray'], '#'));
    foreach ($items_sold as $item_sold_key => $item_sold) {
        if (compareItemCodeWithID($item_sold, $_GET['id'])) {
            if (isGS($item_sold)) {
                $sales[$item_sold] = $prices[$item_sold_key];
                $pns[$item_sold]++;
            } else {
                $sales[$item_sold] = $prices[$item_sold_key];
            }
        }
    }
}
$artistinfo = getArtistInfo($connection, $_GET['id']);
echo "<h1>Artist #" . $_GET['id'] . " Sales Summary</h1>";
?>

<h2>Auction/Quick Sales :</h2>
<table border=1><tr>
<?php 
$total = 0;
$td = 0;
foreach ($sales as $key => $sale) {
    if (!isGS($key)) {
        echo "<td>" . $key . " - <b>\$" . number_format($sale, 2) . "</b></td>";
        $td++;
        $total += $sale;
        if ($td % 6 == 0) {
            echo "</tr><tr>";
Ejemplo n.º 3
0
<?php

$playlistUrl = 'http://yourstreamip:port/your_stream.xspf';
$xmldata = file_get_contents($playlistUrl);
$xml = new SimpleXMLElement($xmldata);
foreach ($xml->trackList->track as $track) {
    echo $track->title . ' - ' . $track->creator . '<br>';
}
define(LAST_FM_API, 'yourlastfmapi');
function getArtistInfo($stream)
{
    $url = 'http://ws.audioscrobbler.com/2.0/?method=artist.getInfo&artist=' . urlencode($stream['info']['artist']) . '&api_key=' . LAST_FM_API . '&autocorrect=1';
    $xmldata = file_get_contents($url);
    $xml = new SimpleXMLElement($xmldata);
    if ($stream['info']['artist'] == 'Unknown') {
        echo '<img width="174" height="174" src=\'unknown-person.gif\' />';
    } else {
        if (!empty($xml->artist->image[2])) {
            echo '<img src=' . $xml->artist->image[2] . '/>';
            //large
        } else {
            echo '<img width="174" height="174" src=\'unknown-person.gif\' />';
        }
    }
    echo '<br>';
}
$qwe['info']['artist'] = $xml->trackList->track->creator;
getArtistInfo($qwe);