All pastes #477323 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-05-08 16:09 UTC
rendered paste body
<?php $ch = curl_init('http://ws.audioscrobbler.com/1.0/artist/Metallica/events.rss');	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);	$curl_return = curl_exec($ch);	$xml = simplexml_load_string($curl_return);	echo $xml;	foreach ($xml as $item) {		if ($i< 8)	{		echo $element->title;		echo $element->description;		echo '<br />';		}		$i++;		$result = count($element);}?>