Zend_Service_Audioscrobbler provides several methods for
retrieving data about a specific artist, specified via the
setArtist() method:
artistGetRelatedArtists(): Returns a SimpleXML object containing a list of Artists similar to the current Artist.artistGetTopFans(): Returns a SimpleXML object containing a list of Users who listen most to the current Artist.artistGetTopTracks(): Returns a SimpleXML object containing a list of the current Artist's top-rated Tracks.artistGetTopAlbums(): Returns a SimpleXML object containing a list of the current Artist's top-rated Albums.artistGetTopTags(): Returns a SimpleXML object containing a list of the Tags most frequently applied to current Artist.
Example 767. Retrieving Related Artists
<?php
$as = new Zend_Service_Audioscrobbler();
// Set the artist for whom you would like to retrieve related artists
$as->setArtist('LCD Soundsystem');
// Retrieve the related artists
$relatedArtists = $as->artistGetRelatedArtists();
foreach ($relatedArtists as $artist) {
// Display the related artists
print '<a href="' . $artist->url . '">' . $artist->name . '</a><br />';
}




