#native_company# #native_desc#
#native_cta#

Display RDF info in your web site

By Diego
on September 11, 2004

Version: 1.0

Type: Sample Code (HOWTO)

Category: Other

License: GNU General Public License

Description: A simple way to display RDF info using SimpleXML. This example uses Fresmeat realses RDF file, but you can change it to display any RDF in the web

<html>

<head>
	<title>RDF Test</title>
	<link rel="stylesheet" type="text/css" href="style.css"/>
</head>

<body>
<?
// RDF - Index
$URL = "http://download.freshmeat.net/backend/fm-releases.rdf";
$rdf = simplexml_load_file($URL);
?>
<div>
<ul>
	<h3>Hoy en Freshmeat</h3><?	
		foreach($rdf->item as $item) { ?>
	<li><a href="<?= $item->link; ?>"><?= $item->title; ?></a></li><?
} ?>
</ul>
</div>
</body>
</html>