Jump to content

Search the Community

Showing results for tags 'rss'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 15 results

  1. I am confused about the use of the <link> and <enclosure> subelements of the <item> subelement. The difference between the <link> subelements of the <channel> and <item> elements appears clear, but the difference between the <link> and <enclosure> subelements of the <item> subelement are difficult to understand. For example, if your RSS feed contained a long series of <item> subelements with each referring to a different podcast, why would you need both a <link> and <enclosure> for the same <item> subelement. <channel> <link></link> <item> <link></link> <enclosure></enclosure> </item> </channel>
  2. trouble parsing just img src out of RSS feed?

    Hello, I am trying to create an RSS reader based on this example: http://www.w3schools.com/php/php_ajax_rss_reader.asp Specifically, I am attempting to modify this example so that the reader will access and display all the available comic images (and nothing else) from any given web comic RSS feed. I realize that it may be necessary to make the code at least a little site-specific, but I am trying to make it as general-purpose as possible. Currently, I have modified the initial example to produce a reader that displays all the comics of a given list of RSS feeds.. However, it also displays other unwanted text information that I am trying to get rid of. Here is my code so far, with a few feeds that are giving me trouble in particular: index.php file: <html> <head> <script> function showRSS() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("rssOutput").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","logger.php",true); xmlhttp.send(); } </script> </head> <body onload="showRSS()"> <div id="rssOutput"></div> </body> </html> (pretty sure there's nothing wrong with this file; I think the problems arise in the next one although I included this one for completeness) logger.php: <?php //function to get all comics from an rss feed function getComics($xml) { $xmlDoc = new DOMDocument(); $xmlDoc->load($xml); $x=$xmlDoc->getElementsByTagName('item'); foreach ($x as $x) { $comic_image=$x->getElementsByTagName('description')->item(0)->childNodes->item(0)->nodeValue; //output the comic echo ($comic_image . "</p>"); echo ("<br>"); } } //create array of all RSS feed URLs $URLs = [ "SMBC" => "http://www.smbc-comics.com/rss.php", "garfieldMinusGarfield" => "http://garfieldminusgarfield.net/rss", "babyBlues" => "http://www.comicsyndicate.org/Feed/Baby%20Blues", ]; //Loop through all RSS feeds foreach ($URLs as $xml) { getComics($xml); } ?> Because this method includes extra text in between the comic images (a lot of random stuff with SMBC, just a few advertisement links for gMg, and a copyright link for baby blues), I looked at the RSS feeds and concluded that the problem is that it's the description tag that includes the image source, but also includes other stuff. Next, I tried modifying the getComics function to scan directly for the image tag, rather than first looking for the description tag. I replaced the part in between the DOMDocument creation/loading and the URL list with: $images=$xmlDoc->getElementsByTagName('img'); print_r($images); foreach ($images as $image) { //echo $image->item(0)->getAttribute('src'); echo $image->item(0)->nodeValue; echo ("<br>"); } but apparently getElementsByTagName doesn't pick up the image tag embedded inside the description tag, because I get no comic images outputted, and the following output from the print_r statement: DOMNodeList Object ( [length] => 0 ) DOMNodeList Object ( [length] => 0 ) Finally, I tried a combination of the two methods, trying to use getElementsByTagNam('img') inside the code that parses out the description tag contents. I replaced the line: $comic_image=$x->getElementsByTagName('description')->item(0)->childNodes->item(0)->nodeValue; with: $comic_image=$x->getElementsByTagName('description')->item(0)->getElementsByTagName('img'); print_r($comic_image); But this also finds nothing, producing the output: DOMNodeList Object ( [length] => 0 ) So sorry for the really long background, but I'm wondering if there is a way to parse just the img src out of a given RSS feed without the other text and links I don't want? Help would be much appreciated
  3. Hi, I've just built a basic web site, but I now realise (by going through the process) that I need to understand other languages & processes in order to make the site streamlined & fully functional. Because I've only learnt html & css (on a basic level) my understanding of php, sql, js, xml, etc is very poor. I therefor need some advice on what the best mechanisms are for inputting data, storing it & displaying it on the web, possibly with some type of rss feed too. The basic process the site is doing, can be described as follows: 1. Users enter data using an online form. 2. Data is stored on a database & manually verified. 3. Certain info from the database is automatically displayed on the site (but not all) in a friendly viewable format. 4. Every time the site is updated a feed is created (like an rss or blog). The first two processes I have achieved, but I am exploring ways of achieving the 3rd & 4th processes. Any advice on what methods or languages would be best to use would be greatly appreciated. I'm happy to learn any coding required. The data set can be stored in various formats (xlsx, csv, ods, tsv, etc), its really a question of the best way to interpret it & automatically display it that I am exploring. Along with creating the feed. Thanks for any advice. Old Guy.
  4. Read RSS from a form thread

    Greetings all. I've read the w3schools tutorial on reading rss feeds on blogs One thing I wondered was if there was a similar php example for reading from a forum thread feed http://w3schools.invisionzone.com/index.php?app=core&module=global&section=rss&type=forums&id=2 Any help would be greatly appreciated. Thanks in advance.
  5. Dynamic RSS tutorial

    how can i create dynamic rss feed using php fo my website....and how can show dynamically that feed please give me proper guideline.
  6. colon in the enclosure tag for RSS

    below is an enclosure tag from craigslist RSS feed. Can anyone tell me what the "enc:" in the tag means <enc:enclosure resource="http://images.craigslist.org/00Y0Y_kZI4M6ZKl0o_300x300.jpg" type="image/jpeg"/>
  7. XML Languages

    Hello!I'm working on a portfolio on XML languages and want to include some thoughts of users about those languages such as RSS,SVG, SMIL and so on. Are there any websites I can read upon opinions related to those topics. Maybe some thought about the how those languages will do in the future. Thank you!
  8. RSS Feed Reader

    Hi all, Just a quick question on rss feed readers. I want to add a rss feed to my website and I am wondering if anyone could recommend a particular feed reader to embed on the web page? Many thanks! Mark.
  9. RSS Feed Problem with https

    I create Rss feed but it does not work with https:when i subscribe it wiht outlook express. it add extra httpe.g;http://https:/www.abc.com Please why this happen with https site.My email id is emc_waseem@hotmail.com My problem just like that site. please see it.https://mvp.support..../gp/mvprssfeedshttp://www.verisign.com/rss/ When i subscribe this site RSS feed with outlook express. it give wrong url in feed.Can you send me coding in asp.net for Rss feed for SSL? My email id is emc_waseem@hotmail.com
  10. The purpose of this assignment is for you to exercise your skills on: 1) server side processing ofXML technologies, 2) consuming web services and 3) making use of digital map services. Your taskin this exercise will be to develop and implement a web-based personalized location based newsservice that will visualize news content in the digital maps based on the location of the particularnews.The system you will develop should provide the following functionality to its users.1. Your system should allow the users to aggregate three different RSS feeds (they should bepure RSS and NOT GeoRSS feeds). Examples of such feeds can be found at:http://newsrss.bbc.c...n/world/rss.xmlhttp://www.nytimes.c...rvices/xml/rss/2. User should be able to filter the aggregated RSS feeds using a random keyword (you canchoose the keyword freely) and based on that to generate a new RSS feed containing onlythe filtered news items.3. The system should enable transformation of the filtered RSS feed into a GeoRSS.4. The system should visualize the generated GeoRSS feed using a digital map service (such asGoogle Maps, Yahoo Maps, Bing Maps, OpenStreetMaps etc.)Im kinda stuck in here , can please somebody help me with my project , cause my teacher is really bad in explaining ...So please somebody help me !
  11. RSS and XML

    I wonder if anyone can help me? I am trying to connect to a RSS feed - which is in a xml file format - and display selected content from the feed in a web page; I am using a Wordpress site to display the output but I do not think that is really relevant. What I am stuck on is how exactly I import [connect to] the feed and then display selected content from the feed. I am used to dynamic content using PHP, MySQL, scripts, client and server side scripting etc so I feel that I should be able to work this out but am finding it very difficult to find reading material on the subject that I want. Can someone pls advise, detail:1. connect to a RSS feed2. display selected content from the feed using XML Thanks...
  12. div id issue pulling data from blog

    div id issue. My website was created by another company in Wordpress and I'm trying to make some edits to it. On the home page, there's a section on the bottom right hand called "From the Blog" and it pulls the latest blog postings. I want to change that section to "Industry News" then put an RSS Feed from another site in that section. I cannot figure out where the coding is to change this. Any help would be greatly appreciated. Site URL: www.shahconsultinggroup.com
  13. Hello Guys,I have this code which creates a text that redirects to a random post for a given feed URL ( For blogger blogs ) <div id="myLuckyPost"></div><script type="text/javascript">function showLucky(root){ var feed = root.feed; var entries = feed.entry || []; var entry = feed.entry[0]; for (var j = 0; j < entry.link.length; ++j){if (entry.link[j].rel == 'alternate'){window.location = entry.link[j].href;}}} function fetchLuck(luck){ script = document.createElement('script'); script.src = 'http://googleblog.blogspot.com/feeds/posts/summary?start-index='+luck+'&max-results=1&alt=json-in-script&callback=showLucky'; script.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(script); } function feelingLucky(root){ var feed = root.feed; var total = parseInt(feed.openSearch$totalResults.$t,10); var luckyNumber = Math.floor(Math.random()*total);luckyNumber++; a = document.createElement('a'); a.href = '#random'; a.rel = luckyNumber; a.onclick = function(){fetchLuck(this.rel);}; a.innerHTML = 'View Random Post'; document.getElementById('myLuckyPost').appendChild(a); }</script> <script src="http://googleblog.blogspot.com/feeds/posts/summary?max-results=0&alt=json-in-script&callback=feelingLucky"></script> an you tell me how to use this generated random link individually as a variable.(ex. I don't want to create a text that redirect me to the random post, I want to put it in a variable form to use it in another script ) Like This: var randompost = random post url here; any help or tip would be appreciated :)Regards,
  14. Displaying Rss Feed, Format Pubdate

    Hi all, I am trying to display an RSS feed on my ASP website. Currently, the date is displayed as "Dec 07 2011." I would like to display it as "December 7, 2011." Here is the code I've put together so far: <html><head><title>RSS Feed Using ASP Classic - For Texas Longhorns Football Schedule from TicketCity.com</title><style> *{font-family:verdana;} td{vertical-align:top;padding:5px 5px 5px 5px;}</style></head><body><%' change the RSSURL variable to the exact URL of the RSS Feed you want to pullRSSURL = "http://blog.surepayroll.com/feed/?alt=rss"Dim objHTTP ' this object is used to call the RSS Feed remotelyDim RSSURL,RSSFeed ' these variables hold the URL and Content for the RSS FeedDim xmlRSSFeed ' this variable hold the XML data in a DOM ObjectDim objItems,objItem, objChild ' these variables are used to temporarily hold data from the various RSS ItemsDim title,pubdate,description,link ' these are local variables that will hold the data to be displayedDim OutputHTML_1,OutputHTML_2,OutputHTML_3 ' these variables will hold the HTML that was converted from the RSS Feed' this code requests the raw RSS/XML and saves the response as a string <RSSFeed>Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")objHTTP.open "GET",RSSURL,falseobjHTTP.sendRSSFeed = objHTTP.responseText' this code takes the raw RSSFeed and loads it into an XML ObjectSet xmlRSSFeed = Server.CreateObject("MSXML2.DomDocument.4.0")xmlRSSFeed.async = falsexmlRSSFeed.LoadXml(RSSFeed)' this code disposes of the object we called the feed withSet objHTTP = Nothing' this is where you determine how to display the content from the RSS Feed' this code grabs all the "items" in the RSS FeedSet objItems = xmlRSSFeed.getElementsByTagName("item")' this code disposes of the XML object that contained the entire feedSet xmlRSSFeed = Nothing' loop over all the items in the RSS FeedFor x = 0 to objItems.length - 8 ' this code places the content from the various RSS nodes into local variables Set objItem = objItems.item(x) For Each objChild in objItem.childNodes Select Case LCase(objChild.nodeName) Case "pubdate" pubDate = objChild.text Case "title" title = objChild.text Case "link" link = objChild.text Case "description" description = objChild.text End Select Next ArrayTemp = split(pubDate, " ") pubDate2 = ArrayTemp(2) & " " & ArrayTemp(1) & " " & Cint(ArrayTemp(3)) ' Here are some various display samples. OutputHTML_1 = OutputHTML_1 & pubDate2 & "<br /><a href=""" & link & """>" & title & "</a><br /><br />" OutputHTML_2 = OutputHTML_2 & "<a href=""" & link & """>" & title & "</a><br />" OutputHTML_3 = OutputHTML_3 & "<a href=""" & link & """>" & title & "</a><hr />"Next%><!-- This is the HTML Layout that will render content from the RSS Feed -->Here is the output, with content provided by the RSS Feed located at:<br /><%=RSSURL%><hr /><table border="1"><tr> <td>Ouput Style 1</td> <td>Ouput Style 2</td> <td>Ouput Style 3</td></tr><tr> <td><%=OutputHTML_1%></td> <td><%=OutputHTML_2%></td> <td><%=OutputHTML_3%></td></tr></table></body></html> I've been looking for a script online as I'm not skilled enough to create code of my own. Can anyone give me some advice?
  15. Basic Rss Parser?

    Hi chaps, I am hoping someone can recommend me a simple to implement script for displaying a blogger feed in a page? I am needing one that I can just pop in and set how many posts to display and the 1st so many characters of the main content. Preferably one with a demo or step by step as am new to this! Using a javascript one currently which and lumpy and horrible so looking for an alternative! Thanks.
×