PHPBuilder - Display RDF info in your web site



RSS Twitter
Snippets Other

Display RDF info in your web site

by: Diego
|
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>

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Diego

Comment:



Comment:

(Maximum characters: 1200). You have characters left.