Back Reply to topic
dd6vd 
(started thread)
Blue-Ribbon Chicken 
Topics: 1
Posts: 2
Location: Berlin
Playing:  Age of Conan
Ingame:  Sturmfaust
Years registered: * * * * * * * * * * * * * * * * *
RSS Feed Posted: Post 09:25 Thu - Aug 14, 2008

Hi Guys !

I have found on the German AOC Forum a RSS Feed.

Take a look at this : http://www.arybot.de/data/Arybot_RSS.zip

I have install it but it works not, Ragebot closes after !news any tips how it works?

Thanks...

P.s.: warum steht hier alles in English, bei ner deutschen Gilde ?
Reply with quote



_________________
Kebra 
Blue-Ribbon Chicken 
Topics: 4
Posts: 10
Playing:  AOC
Ingame:  Anarchie
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 12:40 Sat - Aug 16, 2008

reading XML isnt that big a problem. Usually RSS is just xml.

you can try out the DOM parser in PHP.

This is what i did to read an xml file with donations to our city:
Code:
$donations->load("http://www.someurl.com/yourxmlfile.xml);
     $users = $donations->getElementsByTagName( "user" );
     $text .= "\n\n" . colortext("::::Top10 penge donationer::::\n",$c1=array(200,10,200),$c2=array(220,240,200));
     foreach( $users as $user )
     {
     $usernames = $user->getElementsByTagName( "username" );
     $username = $usernames->item(0)->nodeValue;
    
     $golds = $user->getElementsByTagName( "gold" );
     $gold = $golds->item(0)->nodeValue;
    
       $silvers = $user->getElementsByTagName( "silver" );
     $silver = $silvers->item(0)->nodeValue;
    
     $placements = $user->getElementsByTagName( "placement" );
     $placement = $placements->item(0)->nodeValue;
     if($silver != 0)
     {
        $sdesc = "s";
     }
     else
     {
        $sdesc = "";
     }
     $text.= $placement .". " . $gold . "g" . $silver . $sdesc . " - " . $username ."\n";
      }
      
     send_reply(" " . makelink("Top10 Donationer",$text));


a typical RSS feed looks like this:

Code:
<item>
<title>Nokia 3650 Combines Phone And Photos</title>
<description>I've been playing with the new Nokia 3650. Finally, someone has got the combination of a cell phone with digital camera capabilities right!</description>
<link>http://allgadgetsreviewed.com/nokia3650.html</link>
</item>

which means you have to iterate over the items (instead of the users) and use title, description and link instead of username, placement, gold and silver

If its still not working for you i will try and cook up something
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 09:26 Tue - Aug 19, 2008

maybe worth a release if it's done fies Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Back Reply to topic