include("xml2array.php"); $cnnrss = curl_init(); $nprrss = curl_init(); $slashdotrss = curl_init(); $arsrss = curl_init(); curl_setopt($cnnrss, CURLOPT_URL,"http://rss.cnn.com/rss/cnn_topstories.rss"); curl_setopt($slashdotrss, CURLOPT_URL,"http://rss.slashdot.org/Slashdot/slashdot"); curl_setopt($arsrss, CURLOPT_URL,"http://feeds.arstechnica.com/arstechnica/index/"); curl_setopt($nprrss, CURLOPT_URL,"http://www.npr.org/rss/rss.php?id=1001"); curl_setopt($cnnrss, CURLOPT_RETURNTRANSFER, 1); curl_setopt($slashdotrss, CURLOPT_RETURNTRANSFER, 1); curl_setopt($arsrss, CURLOPT_RETURNTRANSFER, 1); curl_setopt($nprrss, CURLOPT_RETURNTRANSFER, 1); #curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); #curl_setopt($ch, CURLOPT_USERPWD, 'admin:admin'); $output = curl_exec($cnnrss); $output2 = curl_exec($slashdotrss); $output3 = curl_exec($arsrss); $output4 = curl_exec($nprrss); #echo "
"; $array=xml2array($output); $array2=xml2array($output2); $array3=xml2array($output3); $array4=xml2array($output4); #print_r($array4); #exit(); #echo ""; echo " "; ?>"; echo "
"; #echo ""; echo " ".$array['rss']['channel']['title']." ".$array2['rdf:RDF']['channel']['title']." ".$array3['rss']['channel']['title']." ".$array4['rss']['channel']['title']." "; echo " ".$array['rss']['channel']['item']['0']['title']." ".$array2['rdf:RDF']['item']['0']['title']." ".$array3['rss']['channel']['item']['0']['title']." ".$array4['rss']['channel']['item']['0']['title']." "; echo " ".$array['rss']['channel']['item']['1']['title']." ".$array2['rdf:RDF']['item']['1']['title']." ".$array3['rss']['channel']['item']['1']['title']." ".$array4['rss']['channel']['item']['1']['title']." "; echo " ".$array['rss']['channel']['item']['2']['title']." ".$array2['rdf:RDF']['item']['2']['title']." ".$array3['rss']['channel']['item']['2']['title']." ".$array4['rss']['channel']['item']['2']['title']." "; echo " ".$array['rss']['channel']['item']['3']['title']." ".$array2['rdf:RDF']['item']['3']['title']." ".$array3['rss']['channel']['item']['3']['title']." ".$array4['rss']['channel']['item']['3']['title']." "; echo " ".$array['rss']['channel']['item']['4']['title']." ".$array2['rdf:RDF']['item']['4']['title']." ".$array3['rss']['channel']['item']['4']['title']." ".$array4['rss']['channel']['item']['4']['title']."