All pastes #472391 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-05 15:18 UTC
rendered paste body
<div id="footer-2">
<?php if (is_single('35')) {

$ch = curl_init('http://ws.audioscrobbler.com/1.0/artist/Jedi%20Jane/fans.xml');
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	$curl_return = curl_exec($ch);
	$xml = simplexml_load_string($curl_return);
	echo $xml;
	foreach ($xml as $element) {
		if ($i< 12)	{
		echo '<a href="';
		echo $element->url;
		echo '">';
		echo '<img src="';
		echo $element->image;
		echo '"/>';
		echo '</a>';
		}
		$i++;
		$result = count($element);
}

elseif (is_single('34')) { 

$ch = curl_init('http://ws.audioscrobbler.com/1.0/artist/Inside/fans.xml');
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	$curl_return = curl_exec($ch);
	$xml = simplexml_load_string($curl_return);
	echo $xml;
	foreach ($xml as $element) {
		if ($i< 12)	{
		echo '<a href="';
		echo $element->url;
		echo '">';
		echo '<img src="';
		echo $element->image;
		echo '"/>';
		echo '</a>';
		}
		$i++;
		$result = count($element);

    
} elseif (is_single('33')) { 

$ch = curl_init('http://ws.audioscrobbler.com/1.0/artist/Sky%20Pilot/fans.xml');
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	$curl_return = curl_exec($ch);
	$xml = simplexml_load_string($curl_return);
	echo $xml;
	foreach ($xml as $element) {
		if ($i< 12)	{
		echo '<a href="';
		echo $element->url;
		echo '">';
		echo '<img src="';
		echo $element->image;
		echo '"/>';
		echo '</a>';
		}
		$i++;
		$result = count($element);


}?>