Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    Can anyone give me a basic idea of how to generate my RSS feed using PHP? I can understand how to gather the content to fill the XML tags with, but putting the <item> is the correct place (above all the other <item> tags, but below all the headings) is where I am lost.

    Any help would be appreciated.

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Have you looked at the DOM (for PHP 5) or domxml (for PHP 4, and a piece of crap) libraries to generate XML? If you can mentally visualize how you're building the tree, it's easy to do.

    http://www.php.net/dom
    http://www.php.net/domxml

    Don't use domxml in PHP 5, use DOM instead. Fortunately, the two are almost completely compatible, just different methods and accessors. It should be easy to write your own wrapper class that accomodates both automatically by detecting the PHP version.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    Never knew about those. They should be really helpful. Thanks for the info.

  5. #4
    Senior Member straight_up's Avatar
    Join Date
    Dec 2003
    Location
    Pennsylvania/Arizona
    Posts
    601
    Member #
    4309
    is there a specific RSS module out there? so I can maybe just give it a couple of parameters and each item's heading, location, and description? I can do it this way, but don't want ot have to read the rss spec, lol
    I am Alan Hogan (@alanhogan on Twitter). I like PHP, UI/UX design, and OS X.

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    I do not know of any, although I wrote a class for WDF that makes all of the RSS feeds. You give it the relevant RSS information and it provides either the XML object or the actual XML string (the latter for pretty much everything). It also has something to do with that good ol' WDF Notifier, including XML parsing in the client using Microsoft's .NET framework XML parsers. Not RSS, though.

    Given RSS is just XML that must match a certain schema, it's easy to make your own class to do it. WDF's RSS class is something like 150 lines of code. Not too big.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  7. #6
    Senior Member straight_up's Avatar
    Join Date
    Dec 2003
    Location
    Pennsylvania/Arizona
    Posts
    601
    Member #
    4309
    You wouldn't want to share, would you? :-)
    I am Alan Hogan (@alanhogan on Twitter). I like PHP, UI/UX design, and OS X.

  8. #7
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Sorry, I would not as pre the general policy of all code I add to WDF.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:44 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com