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.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: XML and RSS

  1. #1
    Junior Member
    Join Date
    Dec 2006
    Posts
    6
    Member #
    14604
    Hi,

    I have an HTML website that I designed using Dreamweaver MX. I want (if possible) to produce one page that is RSS feed worthy. My understanding was that this page needs to be written in XML. I accomplished this task, but I'm missing something. When I load the page up, you can only view the actual code. I did not import the XML into a template. Rather, I produced a CSS template as an XML. What am I missing - this is a little more complicated than I originally thought. Thanks.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    Usually, you have a database with news articles, lists of MP3 files, graphics, etc. that
    get read by a PHP script and an XML page generated from the PHP script.

    I'm assuming you want to make an RSS feed available for others to use ... from your
    site? You want to FEED the RSS, not READ the RSS?

    Tell us what you're going to feed. Is there information on your site that you
    deem important to feed to others? Give us more information and perhaps a link
    to your site.

    If you meant that you want to READ an RSS feed from another site and display that
    information on your site ... that's the opposite situation.


  4. #3
    Junior Member
    Join Date
    Dec 2006
    Posts
    6
    Member #
    14604
    Hi,
    Thanks for responding.
    I have an e-commerce site with a pretty strong customer base. (Ordinarily, I send out a monthly newsletter (per their request). I have one page that I devote to news - new products and information relevant to my content which is pugs - pug dogs. I should tell you, I do have a blog which I use for marketing purposes, but would like to do same for this particular page.
    Here's the page I want to "feed" -- http://pugspeak.net/lmcrisssbc/pugsp...planetnews.htm.
    Essentially, it would be easier if I could accomplish this. I would not be mired down in monthly emails.
    Please bear in mind - this is not what I originally produced. I have a bonafide XML document, but since it didn't work, I made an html page.
    Thanks

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    OK ...

    Below is a PHP test script you can upload and run.

    First create a blank text file called "myfeed.xml".
    Set the file permissions (CHMOD = 777) so that the script can write to it.

    Then upload the script below, call it something like "test.php" and upload it.

    Go to the script URL and it will create an XML file for you "myfeed.xml".

    If you view "myfeed.xml", you'll see that it created a valid file.

    =========

    Here's the deal though....

    The PHP script has nowhere to get it's information from. In the example I gave,
    I manually entered the title and text. That's where a database is needed. Your
    paragraphs (news articles) should be in some sort of database instead of a static
    web page. You can't just make an RSS feed of a static web page ... there's no
    purpose to that --- you could just send someone the link to your page.

    If your articles are stored in some sort of database (MySQL or flat-file), the PHP
    script could be written to grab all articles and create the XML file from that.

    That's the part I'm not clear about ... how are your articles getting on your page?

    =========

    Here's the test script:

    PHP Code:
    <?php

    $myFile 
    "myfeed.xml";
    $fh fopen($myFile"w") or die("can't open file");
    fwrite($fh"<?xml version=\"1.0\" encoding=\"utf-8\"?>
    <rss version=\"2.0\">
    <channel>
    \n"
    );

    fwrite($fh"
        <title>PugSpeak Pug Planet News</title>
        <description>The Latest News From PugSpeak Planet</description>
        <link>http://pugspeak.net/lmcrisssbc/pugspeak/Pugspeakpugplanetnews.htm</link>
    "
    );

    fwrite($fh"
        <item>
        <title>Monthly Journal from PugSpeak</title>
        <description> Now that we are past the hurley-burley holiday hustle, it's time to think ahead to a new year. This is the perfect time to grab those PugSpeak 2007 Pug calendars and order a fresh supply of custom made pug and pet address labels. Simply email your pug and pet photos and include design, color, and font preferences. We'll take care of the rest. And as always, do not hesitate to email us or phone at (913) 403-8009.

    PugSpeak will be adding new and fun pug gifts to our merchandise line. Be sure to bookmark PugSpeak or subscribe to a our new blog - PugSpeak Ponderings. You will receive up-to-the-minute news and information right on your home page.

    And don't forget to stop by PugSpeak Pug of the Month. For February, we'll feature Musa from Aosta, Italy. </description>
        <link>http://pugspeak.net/lmcrisssbc/pugspeak/Pugspeakpugplanetnews.htm</link>
        </item>
    "
    );

    fwrite($fh"
        <item>
        <title>Joanne Knauf Art Available To Benefit Pug Rescue</title>
        <description> PugSpeak is making available two original Joanne Knauf pug paintings. Proceeds for both sales will be donated to two pug rescue organizations.

    Contemporary artist and dear friend, Joanne Knauf, passed away in March 2006. Joanne lived in Pretoria, South Africa and while she painted scenes and subjects indigenous to her homeland, Joanne's real passion was pugs and her pug art . Joanne was particularly inspired by her own puggy brood - Pugzelle, Biscuit, and Pablo Pugasso. This passion was reflected in over 65 pug paintings.

    It's important to know that Joanne donated her pug art to many pug rescues over the years including southeastern rescues after the Katrina disaster. She believed in the pug cause and we want to continue that effort in her memory. We are proud to make available two original Joanne Knauf paintings - Pugzelle and Little Princess of the Jungle Kingdom.

    For more information, please contact Mary Crissman at pugspeak@sbcglobal.net or phone at (913) 403-8009. </description>
        <link>http://pugspeak.net/lmcrisssbc/pugspeak/Pugspeakpugplanetnews.htm</link>
        </item>
    "
    );

    fwrite($fh"
    </channel>

    </rss>"
    );

    fclose($fh); 

    echo 
    "<a href='myfeed.xml'>View the RSS Feed</a>";

    ?>


  6. #5
    Junior Member
    Join Date
    Dec 2006
    Posts
    6
    Member #
    14604
    I am attempting to treat this particular page as a blog. If you go to a blog, post some information, then publish (and you're hooked up RSS-wise, as it were) then you get the desired results.
    So, in answer to your question, I put the information on the page - daily, weekly or monthly.
    Thanks

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    So you edit the static web page manually?

    or is it an actual blog with some server-side scripting?


  8. #7
    Junior Member
    Join Date
    Dec 2006
    Posts
    6
    Member #
    14604
    Yes, I edit manually. I do have a "server-side" blog (separate issue from this), but this page is from my HTML website.
    I just finished the page you looked at as a PHP which I converted to XHTML. It has passed the validation test (except for the midi I embedded). I also had a program on my computer called "Feed For All." It produced RSS code similar to what you sent me. Now my question is: How do I bring this all together? How do I incorporate?
    Thanks

  9. #8
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    What exactly are you feeding? Just the news paragraphs (like my example), or
    everything on the page? I'm kind of confused.


  10. #9
    Junior Member
    Join Date
    Dec 2006
    Posts
    6
    Member #
    14604
    I'm just interested in feeding the news items - 3 or 4 paragraphs. I don't care if they don't see the whole page.
    Here's the deal: I frequently add new items (pug-themed merchandise) to my website. And business is good. My customers have asked to be put on a mailing list, but as things stand now, I'm sending out upwards of 250+ emails a month. Some of my old customers have just bookmarked the site and check in regularly. Others would like to be told when something new is available. Additionally, I run a local pug organization in our area, so that info dovetails with the rest. Actually, I have a lot of things going on that runs through PugSpeak, so I think it would be helpful to have something like this set up, if possible.
    Thanks again,
    Mary

  11. #10
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    So instead of getting the newsletter in their email, they would subscribe to
    your RSS Feed and see the latest feeds in their RSS Reader. If they have
    Yahoo email or Google email, AOL, etc. they can subscribe by clicking on your
    future RSS Syndication Link.

    That being said, your "clients" would need to not only know what an RSS
    Feed is, but know how to impliment it on their email client, browser based
    RSS Reader, or website (if they want to re-publish your articles on their own
    pug website).

    Because you manually update your webpage, you don't have much choice but to
    manually create the XML file for your feed. A PHP script could scan your HTML
    static webpage and attempt to create a feed by parsing the text, but that would
    take some fancy PHP scripting.

    You might want to consider hiring a coder to work with you on that.

    Is that page (the link you provided earlier) the exact page you will be using
    for your feed? Or did you just provide that as an example? I also noticed
    an RSS Dreamfeeder icon on the page ... what's that all about?

    I'm asking these questions because I might be able to do some coding for you,
    but won't quote a fee until I ask a few questions first.



Page 1 of 2 1 2 LastLast

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 11:05 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com