Location: PHPKode > projects > MyOWNSpace > MyOWNspace_v8.2/www/myownfoaf.php
<?
include ("config.php");
include ("login.inc.php");

$i=0;
$max=10;

foreach($myspace as $myownspace)
{
$i++;
$foaf='<rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
      xmlns:foaf="http://xmlns.com/foaf/0.1/"
      xmlns:admin="http://webns.net/mvcb/">
<foaf:PersonalProfileDocument rdf:about="">
  <foaf:maker rdf:resource="#me"/>
  <foaf:primaryTopic rdf:resource="#me"/>
  <admin:generatorAgent rdf:resource="http://www.ldodds.com/foaf/foaf-a-matic"/>
  <admin:errorReportsTo rdf:resource="mailto:hide@address.com"/>
</foaf:PersonalProfileDocument>
<foaf:Person rdf:ID="me">
<foaf:name>'.$myownspace[artiste].'</foaf:name>
<foaf:title>'.$myownspace[titre].'</foaf:title>
<foaf:nick>'.$myownspace[artiste].'</foaf:nick>
<foaf:homepage rdf:resource="http://myownspace.fr/'.$i.'"/>
<foaf:depiction rdf:resource="'.$myownspace[image].'"/>
';

$friends="myownfriends/friends.".$i.".php";
include $friends;
foreach($myownfriend as $myownfriends)
{
$foaf.='<foaf:knows>
<foaf:Person>
<foaf:name>'.$myspace[$myownfriends][artiste].'</foaf:name>
<foaf:depiction rdf:resource="'.$myspace[$myownfriends][image].'"/>
<rdfs:seeAlso rdf:resource="http://myownspace.fr/myownFOAF/'.$myownfriends.'.rdf"/></foaf:Person></foaf:knows>';

}
$RDFfile="myownFOAF/".$i.".rdf";
$foaf .= "
</foaf:Person></rdf:RDF>";
writeTXT($RDFfile,$foaf);

}

?>
Return current item: MyOWNSpace