Markus "guruz" Goetz

[ index | hardware | projects and coding | p300 | blog | contact ]




August 8, 2008 at 8:49 am.
Abgelegt unter: Coding,Web
guruz @ 8:49 am

Einnahmen von Layer-ads.de als RSS-Feed immer aktuell anzeigen

Wenn ihr gerne euren Layerads-Verdienst im Feedreader anzeigen wollt, koennt ihr mit diesem PHP Skript einen Feed erzeugen:

<rss version="2.0">
<channel>
<title>Layer-ads.de Kontostand</title>
<?
$contents = file_get_contents ("http://layer-ads.de/api/BLABLABLA");
$simplexml = simplexml_load_string ($contents);
$amount = $simplexml->xpath ("//layerads/stats/balance");
foreach ($amount as $a)
{
print "<item>";
print "<title>Layer-ads.de Kontostand: " . $a . " EUR</title>";
print "</item>";
}
?>
</channel>
</rss>

Die URL fuer oben findet ihr im Layer-Ads Webinterface bei “Statistiken”.

Ich habe uebrigens auch ein aehnliches Skript fuer Affilinet geschrieben.

Willst du automatisch ueber neue Artikel informiert werden? Dann subscribe dich via E-Mail oder via RSS


WordPress: RSS Feed for Categories
GMail inbox als Atom Feed
Kitty geht mit auf Streife

  • http://N95-Freak.de Sascha

    Und wie bau ich das um? Und was muss ich damit machen?

  • http://guruz.de guruz

    Du kopierst den code in eine datei, aenderst die URL bei file_get_contents und laedst es auf deinen webspace hoch :)

  • http://N95-Freak.de Sascha

    Also pack ich es in ne php datei?
    Das hab ich gemacht und habs hochgeladen.
    Wenn ich es dann öffne hab ich ne leere Seite vor mir.

  • http://guruz.de guruz

    Es ist ein PHP-Skript, klar packst du es in eine PHP-Datei ;)

    Naja, und jetzt benutzt du einen Feedreader und addest die URL da rein. Lies am besten mal http://de.wikipedia.org/wiki/RSS