php script to include rss feed into html page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fletch XXX
    GFY HALL OF FAME DAMMIT!!!
    • Jan 2002
    • 60840

    #1

    php script to include rss feed into html page

    anything? have tried a few free ones with no luck...

    dont need to morph it or change it just include it as is...

    Want an Android App for your tube, membership, or free site?

    Need banners or promo material? Hit us up (ICQ Fletch: 148841377) or email me fletchxxx at gmail.com - recent work - About me
  • Zoxxa
    Confirmed User
    • Feb 2011
    • 1026

    #2
    I thought you became a coder within the past months? Grab the feed with file_get_contents or curl, Run it through a new simplexmlelement class to create an object from it and run through it with a while loop. Done.
    [email protected]
    ICQ: 269486444
    ZoxEmbedTube - Build unlimited "fake" tubes with this easy 100% unencoded CMS!

    Comment

    • Tube Ace
      So Fucking Banned
      • Nov 2008
      • 4941

      #3
      PHP Code:
      <?php
      
      $feedURL = "http://rss.cnn.com/rss/cnn_topstories.rss";
      
      $xml = simplexml_load_file($feedURL);
          
      foreach ($xml->channel as $record){
          
          $title = $record->title; 
          $link =  $record->link; 
          $description = $record->description;
          $image_url = $record->image->url;
          
          echo "<a href=\"$link\">$title</a>";
          echo "<br /><img src=\"$image_url\">";
          
      }
      
      foreach ($xml->channel->item as $record){
                          
          $title = $record->title; 
          $link = $record->link;      
          $description = $record->description;   
          $pubDate = $record->pubDate;   
          
          echo "<br /><br /><a href=\"$link\">$title</a> $pubDate";
          echo "<br />$description";
      
      }
      
      ?>

      Comment

      • Fetish Gimp
        Confirmed User
        • Feb 2005
        • 1699

        #4
        My vote is for SimplePie, a PHP class to handle the dirty work, has caching which is nice. Google "SimplePie tutorial" and you'll get plenty of examples on how to use it.
        Strapon Seduction - femdom blog | Twitter

        Comment

        • Zoxxa
          Confirmed User
          • Feb 2011
          • 1026

          #5
          Dirty work? This has to be one of the easiest things to do.
          [email protected]
          ICQ: 269486444
          ZoxEmbedTube - Build unlimited "fake" tubes with this easy 100% unencoded CMS!

          Comment

          • Fletch XXX
            GFY HALL OF FAME DAMMIT!!!
            • Jan 2002
            • 60840

            #6
            Originally posted by Zoxxa
            Dirty work? This has to be one of the easiest things to do.
            I have nothing but respect to those of you who can just conjure this stuff man. I thank anyone for help but no i am not a coder, and if you are perhaps I can use you on some projects

            Want an Android App for your tube, membership, or free site?

            Need banners or promo material? Hit us up (ICQ Fletch: 148841377) or email me fletchxxx at gmail.com - recent work - About me

            Comment

            • Deej
              I make pixels work
              • Jun 2005
              • 24386

              #7
              simple pie...

              its cake!

              Deej's Designs n' What Not
              Hit me up for Design, CSS & Photo Retouching


              Icq#30096880

              Comment

              • Fletch XXX
                GFY HALL OF FAME DAMMIT!!!
                • Jan 2002
                • 60840

                #8
                Originally posted by Tube Ace
                code
                thank you, it works perfect.

                Want an Android App for your tube, membership, or free site?

                Need banners or promo material? Hit us up (ICQ Fletch: 148841377) or email me fletchxxx at gmail.com - recent work - About me

                Comment

                • Zoxxa
                  Confirmed User
                  • Feb 2011
                  • 1026

                  #9
                  Originally posted by Fletch XXX
                  I have nothing but respect to those of you who can just conjure this stuff man. I thank anyone for help but no i am not a coder, and if you are perhaps I can use you on some projects
                  I meant no disrespect, I have just seen you posting around the board about your android apps and C based language skills.
                  [email protected]
                  ICQ: 269486444
                  ZoxEmbedTube - Build unlimited "fake" tubes with this easy 100% unencoded CMS!

                  Comment

                  Working...