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

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

$myarray = object2array($xml);

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

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

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

Dit is het resultaat:

District Noorderkempen[A4100D]Turnhout
Sint Victor[A4103S]Turnhout
Sint-Michiel[A4104G]Turnhout
André De Thaye[A4105S]Beerse
Sint-Frans[A4106S]Turnhout
Sint-Joris[A4107M]Turnhout
Don Bosco[A4108G]Vosselaar
Akabe Ommekaar[A4109G]Turnhout
Scouting Ravels[A4111G]Ravels
Sint-Lucas[A4112G]Turnhout
Sint-Franciscus[A4113G]Turnhout
Koningin Astrid[A4115M]Turnhout
Sint-Godelieve[A4117M]Turnhout
Ansarat[A4119G]Oud-Turnhout
Carpe Diem[A4120G]Arendonk
Zeescouts Toxandria[A4122G]Turnhout
District Mol[A4200D]Mol
Sint-Pieter[A4201S]Mol
Sint-Willebrordus[A4202S]Mol
Sint-Antonius - Sint-Agnes[A4203G]Mol
Sint-Paulus[A4204S]Mol
Sint-Carolus[A4205S]Mol
Tijl[A4207S]Mol
't Kruierke[A4209G]Balen
Gidsen J.F. Kennedy[A4212M]Mol
Gidsen Nele Achterbos[A4213M]Mol
Sint-Martinus[A4216G]Retie
Sint-Ludovicus[A4301S]Herentals
Sint-Waldetrudis[A4302M]Herentals
Sint-Aloysius[A4303S]Geel
Akabe De Pioen[A4304G]Geel
Scouts Lille - Poederlee[A4306S]Lille
Sint-Tarcitius[A4307S]Geel
Sint-Waldetrudis[A4308S]Herentals
De Klauwaerts[A4309M]Geel
Jongensstad[A4310S]Westerlo
Scouts Blauberg[A4311S]Herselt
Reynaert - Adinda[A4312G]Herentals
Sint-Gummarus[A4401S]Lier
Akabe Albatros Pijpelheide[A4402G]Booischot
Akabe en Gidsen Pijpelheide[A4402G]Booischot
Sint-Pieter - Sint-Lucia[A4403S]Berlaar
Bosvogels[A4406G]Grobbendonk
Sint-Kristoffel[A4410S]Booischot
Sint-Gertrudis[A4411M]Booischot
Sparrijders[A4412S]Nijlen
Zandstuivers[A4414S]Pulle

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