quick PHP script to check a user's "seen live" tagged artists.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
918 B

<?php
ini_set('allow_url_fopen ','ON');
$url = "http://ws.audioscrobbler.com/2.0/?method=user.getpersonaltags&user={$_POST["username"]}&tag=seen+live&taggingtype=artist&limit=400&api_key=&limit=1500" ;
$xml=simplexml_load_string( file_get_contents($url)) or die("Error: Cannot create object. Check username for spaces.");
$url2 = "http://ws.audioscrobbler.com/2.0/?method=user.gettopartists&user={$_POST["username"]}&limit=400&api_key=";
$xml2=simplexml_load_string( file_get_contents($url2)) or die("Error: Cannot create Object. Check username for spaces.");
echo "<!DOCTYPE html><html><head><title>Wheee, Live Music!</title></head><body>";
echo "Total Seen Live: " ;
echo $xml->taggings[0]['total'] . "<br>" . "<br>";
foreach($xml->taggings->artists->children() as $artist) {
echo '<a href="' . $artist->url . '">' . '<img src="' . $artist->image . '"></a> ' . $artist->name . "<br>";
}
echo "</body></html>";
?>