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

District Lelie - Gouw Waas




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/O33.xml?a=$today");
if (!$xml){exit("Failed to open O33.xml.<br />");}

$myarray = object2array($xml);

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

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

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

Dit is het resultaat:

District Lelie[O3300D]Rumst
Sint-Michiel[O3301G]Kieldrecht (Beveren)
Sint-Raphael[O3302G]Beveren-Waas
Sint-Willibrordus[O3305S]Temse
Sint-Jan[O3306G]Steendorp
Sint-Jan Berchmans[O3307S]Rupelmonde
Gidsen St.-Martinus[O3312M]Beveren-Waas
Sint-Johannes[O3314G]Sint-Gillis-Waas

Je kan deze data ook tonen op een google map.


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