+ Post New Thread
Results 1 to 8 of 8
How do you do....it? Thread, RSS feed creation. in Technical; I am new to RSS and have created a XML/RSS file with notepad. It al works well and when i ...
  1. #1
    Kyle's Avatar
    Join Date
    Jan 2006
    Posts
    983
    Thank Post
    92
    Thanked 14 Times in 13 Posts
    Rep Power
    21

    RSS feed creation.

    I am new to RSS and have created a XML/RSS file with notepad. It al works well and when i update my 'latest news page onthe web site and add the relevant info to the xml file all works well.

    I may bea bit naive here but, is ther a easier way? Is there naythingthat can tell that you have updated your webpage/html file and that it updates the xml file.

    I am new to this and to being a technician so any help would be great.

  2. #2

    russdev's Avatar
    Join Date
    Jun 2005
    Location
    Leicestershire
    Posts
    6,946
    Thank Post
    709
    Thanked 553 Times in 368 Posts
    Blog Entries
    3
    Rep Power
    204

    Re: RSS feed creation.

    Hello Kyle

    what do you use to do website as maybe something coded into that if not then we can look to see would create a dynamic rss feed.

    russ

  3. #3
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    Re: RSS feed creation.

    I use Dreamweaver 2004 to do my website is there any tips on RSS with this?

  4. #4
    Kyle's Avatar
    Join Date
    Jan 2006
    Posts
    983
    Thank Post
    92
    Thanked 14 Times in 13 Posts
    Rep Power
    21

    Re: RSS feed creation.

    I also use Dreamweaver as well, i have only played with my own RSS created in notepad..........was wondeing if their was somthing less manually time cosuming.

  5. #5

    russdev's Avatar
    Join Date
    Jun 2005
    Location
    Leicestershire
    Posts
    6,946
    Thank Post
    709
    Thanked 553 Times in 368 Posts
    Blog Entries
    3
    Rep Power
    204

    Re: RSS feed creation.


  6. #6
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,529
    Thank Post
    108
    Thanked 89 Times in 75 Posts
    Blog Entries
    47
    Rep Power
    40

    Re: RSS feed creation.

    on a website i once had I made a sheduled php script that (re)created an rss feed from a database. i'm not sure i have the code for it. will have a look at home.

  7. #7
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,529
    Thank Post
    108
    Thanked 89 Times in 75 Posts
    Blog Entries
    47
    Rep Power
    40

    Re: RSS feed creation.

    Code:
    <?php
    $dbc = mysql_connect("localhost", "antiphishing_org_uk", "9a9ca65a") or die ('could not connect:'. Mysql_error());
    mysql_select_db("antiphishing_org_uk_1");
    
    
    $file="news.xml";
    $jsfile="news.js";
    
    //ftruncate($file,0);
    
    $fp = fopen ($file, "w") or die("can't open/create file");
    $fjs = fopen ($jsfile, "w") or die ("can't open/create js file");
    
    //write rss file header
    
    if (!fwrite($fp,"<?xml version=\"1.0\" ?>\n")) {echo ("cant write"); }
    fwrite($fp,"<rss version=\"2.0\">\n");
    fwrite($fp,"<channel>\n");\
    fwrite($fp,"<title>Antiphishing Crusade</title>\n");
    fwrite($fp,"<link>http://www.antiphishing.org.uk</link>\n");
    fwrite($fp,"<description>\nKeeping tabs on those trying to defraud us\n</description>\n");
    fwrite($fp,"<language>en-us</language>\n");
    fwrite($fp,"<webMaster>webmaster@antiphishing.org.uk</webMaster>\n");
    
    //write js file header
    fwrite($fjs,"document.write(\"<div class='js_news'>\");\n");
    if (!fwrite($fjs, "document.write(\"<font face='verdana' size='2'>Antiphishing Crusade</font>
    <font face='arial' size='2'>Latest Phishing News</font>
    
    \");\n")) {echo ("cant write js"); }
    
    
    $query= "SELECT address,title,quote,DATE_FORMAT(adddate,'%e %M') FROM news ORDER BY adddate desc LIMIT 10";
    $result=@mysql_query($query);
    if ($result){
    	while ($row = mysql_fetch_array($result,MYSQL_NUM)) {
            //write rss feed
             $row1 = htmlspecialchars($row[1]);
             $row2 = htmlspecialchars($row[2]);
             $row0 = htmlspecialchars($row[0]);
             fwrite($fp,"<item>\n");
     		 fwrite($fp,"<title>$row[3] $row1</title>\n");
    		 fwrite($fp,"<link>$row0</link>\n");
             fwrite($fp,"<description>$row2</description>\n");
     		 fwrite($fp,"</item>\n");
            //write js feed
             fwrite($fjs,"document.write(\"<font face='arial' size='2'>$row[3]</font>
    <font face='arial' size='1'>$row[1]</font>
    \");\n");
    
    
    		}
    	mysql_free_result($result);
    }
    
    
    fwrite($fp,"</channel>\n");
    fwrite($fp,"</rss>\n");
    
    fwrite($fjs,"document.write(\"</div>\");");
    
    fclose($fp);
    fclose($fjs);
    
    ?>

  8. #8

    Join Date
    Jul 2005
    Location
    Corby
    Posts
    1,056
    Thank Post
    12
    Thanked 20 Times in 18 Posts
    Rep Power
    24

    Re: RSS feed creation.

    On a related topic I have been playing with Apple's iWeb (part of the new iLife '06 suite) and am loving it. It's not as functional as other blogging platforms or web design tools. but it is very easy and allows for easy RSS integration and update notification.

    I seem to remember the Visual Basic 2005 Express Edition coming with an add-on pack that takes you through the process of writing an RSS application that you can add to etc. Might be worth checking that out on the MS site?

    http://msdn.microsoft.com/vstudio/ex...l/default.aspx

    HTH (even a little)

    Paul

SHARE:
+ Post New Thread

Similar Threads

  1. Waste 10 minutes and feed the world...
    By SpuffMonkey in forum Jokes/Interweb Things
    Replies: 4
    Last Post: 13th November 2007, 10:47 AM
  2. MS Download Centre RSS Feed.
    By Geoff in forum Links
    Replies: 0
    Last Post: 29th May 2007, 03:53 PM
  3. Random RSS Feed
    By russdev in forum Comments and Suggestions
    Replies: 4
    Last Post: 21st March 2006, 10:22 AM
  4. Slashdot RSS feed removed
    By Dos_Box in forum General EduGeek News/Announcements
    Replies: 9
    Last Post: 16th December 2005, 12:32 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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