Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2006
    Posts
    2,593
    Tokens
    0

    Latest Awards:

    Default Habbo RSS News Feed

    PHP Code:
    <?php 
    /*
                               
    */
    //url to rss feed of habbo site
    $site "http://www.habbohotel.com/habbo/en/community/newsletter/rss";
     
    //dont edit anything below this line!
    $insideitem false;
    $tag "";
    $title "";
    $description "";
    $link "";
    function 
    startElement($parser$name$attrs) {
    global 
    $insideitem$tag$title$description$link;
    if (
    $insideitem) {
    $tag $name;
    } elseif (
    $name == "ITEM") {
    $insideitem true;
    }
    }
    function 
    endElement($parser$name) {
    global 
    $insideitem$tag$title$description$link;
    if (
    $name == "ITEM") {
    //echo's the content
    printf("<dt><b><a href='%s'>%s</a></b></dt>",
    trim($link),trim($title));
    printf("<dd>%s</dd>",trim($description));
    $title "";
    $description "";
    $link "";
    $insideitem false;
    }
    }
    function 
    characterData($parser$data) {
    global 
    $insideitem$tag$title$description$link;
    if (
    $insideitem) {
    switch (
    $tag) {
    case 
    "TITLE":
    $title .= $data;
    break;
    case 
    "DESCRIPTION":
    $description .= $data;
    break;
    case 
    "LINK":
    $link .= $data;
    break;
    }
    }
    }
    $xml_parser xml_parser_create();
    xml_set_element_handler($xml_parser"startElement""endElement");
    xml_set_character_data_handler($xml_parser"characterData");
    $fp fopen("$site","r")
    or die(
    "Error reading RSS data.");
    while (
    $data fread($fp4096))
    xml_parse($xml_parser$datafeof($fp))
    or die(
    sprintf("XML error: %s at line %d"
    xml_error_string(xml_get_error_code($xml_parser)), 
    xml_get_current_line_number($xml_parser)));
    fclose($fp);
    xml_parser_free($xml_parser);
    ?>
    Here is an example:

    www.jmiller.be/habbo/rss.php
    Last edited by James!; 09-02-2006 at 09:31 PM.

  2. #2
    Join Date
    Jan 2006
    Posts
    2,593
    Tokens
    0

    Latest Awards:

    Default

    //url to rss feed of habbo site
    $site = "http://www.habbohotel.con/habbo/en/community/newsletter/rss";

    Change that to:

    //url to rss feed of habbo site
    $site = "http://www.habbohotel.co.uk/habbo/en/community/newsletter/rss";

    For UK news.

  3. #3
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Hey,

    It is actually really simple to do this, there is a tutorial on P2L and I think you followed a tutorial. Anyway why would people want a Habbo Hotel RSS feed?

    Everyone thinks RSS is so difficult but it stands for something like 'Real Simple Syndication' or something i'm not sure, so feel free to correct me

    Anyway I suppose this will be helpful to the newcomers who want Habbo Hotel Feeds on their Habbo Fansite.

    - Dan

  4. #4
    Join Date
    Jan 2006
    Posts
    2,593
    Tokens
    0

    Latest Awards:

    Default

    I found a thread on this on HF.

    Thought it was useful..

    This would be great to people who dont want news reporters, they can just clean up the font and layout, and put it in an iFrame.

  5. #5
    Join Date
    Feb 2005
    Location
    Florida, USA
    Posts
    527
    Tokens
    0

    Default

    I saw this in a nother habbo forum. Are you sure its yours. Lol
    Even Though We May Be From Different Places, Speak In Different Tounges, Our Hearts
    Still Beats As One.



  6. #6
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    He ripped it from Habbo Forum ''/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •