Naar de startpagina van deze website
Naar de startpagina van deze website

Gouw Gent - Scouts en Gidsen Vlaanderen





Gebruik dit stukje php-code om links op je website te plaatsen.
<?php
function object2array($object){
$return = NULL;

if(is_array($object)){
	foreach($object as $key => $value)
	$return[$key] = object2array($value);
}else{
	$var = get_object_vars($object);

if($var){
	foreach($var as $key => $value)
	$return[$key] = ($key && !$value) ? NULL : object2array($value);
	}
	else return $object;
	}
return $return;
}


$today = date("Ymd");
$xml = simplexml_load_file("http://scoutnet.be/xml/O1.xml?a=$today");
if (!$xml){exit("Failed to open O1.xml.<br />");}

$myarray = object2array($xml);

$num_marker = count($myarray['O1']['marker']);

echo "<table class=\"snsample\">\n";
for($i = 0; $i < $num_marker; $i++) {
if (($myarray['O1']['marker'][$i]['@attributes']['domain']!='nodomain')&&($myarray['O1']['marker'][$i]['@attributes']['domain']!='')){
	$mylink="<a href='http://www.{$myarray['O1']['marker'][$i]['@attributes']['domain']}'>".utf8_decode($myarray['O1']['marker'][$i]['@attributes']['groupname'])."</a>";
}else{
	$mylink="<a href='http://{$myarray['O1']['marker'][$i]['@attributes']['name']}.scoutnet.be'>".utf8_decode($myarray['O1']['marker'][$i]['@attributes']['groupname'])."</a>";
}
if ($myarray['O1']['marker'][$i]['@attributes']['groupID']!=''){
	$mygroupID='['.$myarray['O1']['marker'][$i]['@attributes']['groupID'].']';
}else{
	$mygroupID='';
}

echo "<tr><td>$mylink</td><td>$mygroupID</td><td>".utf8_decode($myarray['O1']['marker'][$i]['@attributes']['city'])."</td></tr>\n";
}
echo "</table>\n";
?>

Dit is het resultaat:

Scoutnet - Test CMS[O10]Tienen
Gouw Gent[O1000P]Gent
Houtekiet[O1101G]Oosteeklo
Gertrude[O1102M]Maldegem
Michiel de Ruyter[O1106G]Boekhoute
Vuurtorengroep[O1107G]Zelzate
Baden-Powell Eeklo[O1112G]Eeklo
Sint-Coleta[O1115M]Gent
Brigands - De Kleine Prins[O1205G]Wondelgem
Pegasus - Andromeda[O1210G]Evergem
Ardu[O1211S]Mariakerke (Gent)
Scouts en Gidsen Sint-Gerulfus Drongen[O1212G]Drongen
Ten Berg[O1301G]Gent
Akabe Ast[O1303G]Gent
Sint-Bernadette[O1304G]Sint-Amandsberg (Gent)
Haegepoorters[O1306G]Destelbergen
Hubert De Bruyker[O1307G]Gentbrugge
JoVA[O1308G]Gentbrugge
Sint-Lucia[O1309M]Oostakker
Klauwaards Sint-Martinus[O1310G]Gent
Sint-Lieven[O1313S]Destelbergen
Joe English[O1328G]Heusden (Ovl.)
Sint-Petrus[O1401G]Gent
Sint-Paulus[O1404G]Gent
O.L.V. Met De Glimlach[O1405G]Gent
Scouting in Kriko[O1406G]Gent
De Rots[O1408G]Gent
Sint-Barbara[O1413S]Gent
Akabe Sjim[O1415G]Gent
Sint-Joris[O1417S]Gent
District Moerkensheide[O1500D]Gent
Sint-Michiel en Sint-Elisabeth[O1501G]Deinze
Zonnekerels[O1502S]Sint-Denijs-Westrem
Dominiek Savio Ludwina[O1503G]De Pinte
Were Di - Bos en Leie[O1504G]Sint-Martens-Latem
Inch Allah[O1505S]Kruishoutem
De Witte Kaproenen[O1506G]Aalter
Scouts 't Hoekske[O1513G]Aalter
Nieuwland[O1514G]Hansbeke

Hulp nodig? aarzel dan niet om ons te contacteren.
© Scoutnet 2023