Location: PHPKode > projects > Online Last.FM Player > meta.php
<?php
session_start();
include_once 'class/load.php';
$lcs_lastfm = new lcs_lastFm();
$lcs_lastfm->info = $_SESSION['info'];
$meta = $lcs_lastfm->getMeta();
$time = 15;

if ( !isset($meta['albumcover_medium']) ) {
	$albumArt = '<img src="images/noalbum.gif" width="170" height="170" alt="" />';
}
else {
	if ( isset($meta['albumcover_large']) ) {
		$artist = ''.$meta['artist'].'</a>';
		$albumArt = '<a href="#" onClick="window.open(\''.$meta['albumcover_large'].'\',\'Large Arlbum Art\',\'width=500,height=500,left=100,top=100,screenX=100,screenY=100\')"><img src="'.$meta['albumcover_medium'].'" width="170" height="170" alt="" /></a>';
	}
	else {
		$albumArt = '<img src="'.$meta['albumcover_medium'].'" width="170" height="170" alt="" />';
	}
}

if ( !isset($meta['artist']) ) {
	$artist = 'Unknown Artist';
}
else {
	if ( isset($meta['artist_url']) ) {
		$artist = '<a href="'.$meta['artist_url'].'" target="_blank">'.$meta['artist'].'</a>';
	}
	else {
		$artist = $meta['artist'];
	}
}

if ( !isset($meta['album']) ) {
	$album = 'Unknown Album';
}
else {
	if ( isset($meta['album_url']) ) {
		$album = '<a href="'.$meta['album_url'].'" target="_blank">'.$meta['album'].'</a>';
	}
	else {
		$album = $meta['album'];
	}
}

if ( !isset($meta['track']) ) {
	$track = 'Unknown Atrack';
	$time = 1;
}
else {
	if ( isset($meta['track_url']) ) {
		$track = '<a href="'.$meta['track_url'].'" target="_blank">'.$meta['track'].'</a>';
	}
	else {
		$track = $meta['track'];
	}
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Online Last.FM Player - Login</title>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="style.css" />
	<meta http-equiv="Refresh" content="<?php echo $time; ?>" />
</head>
<body style="background: #E3E6D8;">
	<div id="infoBackground">
		<div id="albumArt"><?php echo $albumArt; ?></div>
		<div id="info">
			<div id="artistInfo"><img src="images/artist.png" alt="" />&nbsp;<?php echo $artist; ?></div>
			<div id="albumInfo"><img src="images/album.png" alt="" />&nbsp;<?php echo $album; ?></div>
			<div id="trackInfo"><img src="images/track.png" alt="" />&nbsp;<?php echo $track; ?></div>
		</div>
	</div>
	<div id="refresh">
		<a href="#" onclick="window.location.reload();"><img src="images/refresh.png" alt="" /></a>
	</div>
</body>
</html>
Return current item: Online Last.FM Player