whole xml database shows in module. how to get rid of it?

A multipurpose module, plugin and component

whole xml database shows in module. how to get rid of it?

New postby kyberkelte » Sat Jan 22, 2011 12:10 pm

hi folks, you built an amazing extension! I am trying to use specific data of an external xml-feed. Shown in an article, everything is fine. Shown in a module, the whole xml-data is added. What am I doing wrong? Check out this page: http://www.kelturei.ch/testserver1/index.php?option=com_jumi&fileid=3&Itemid=54

And that's the code I use (stored in jumi_bafu.php):

Code: Select all

$url = 'http://www.hydrodaten.admin.ch/lhg/SMS.xml';
$ch = curl_init();
         curl_setopt($ch, CURLOPT_URL, $url);
         curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20080201 Firefox/");
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept-Language: de-de, de;"));
            $content = curl_exec ($ch);
            curl_close ($ch);
$AKT_Data = new SimpleXMLElement($content); 

echo $AKT_Data->MesPar[306]->Name, '<br />';
echo $AKT_Data->MesPar[306]->Datum, ' - ';
echo $AKT_Data->MesPar[306]->Zeit, 'h<br />Volumen: ';
echo $AKT_Data->MesPar[306]->Wert[0], 'm<sup>3</sup><br /><small>&empty; Volumen 2010: 380m<sup>3</sup></small><br />Temparatur: ';
echo $AKT_Data->MesPar[308]->Wert[0], '<br /><br />Quelle: <a href="http://www.bafu.admin.ch/" target="_blank">BAFU</a><br />';


Thanks for your help!
Posts: 1
Joined: Sat Jan 22, 2011 12:02 pm

Return to Jumi

Who is online

Users browsing this forum: No registered users and 8 guests