Using keywords with RSS feed links - php

I learned from some sites (such as from this) that I can use keywords with RSS feed links, but I have not succes when I try this with a particular site. Is this way of access RSS feeds a general one, or it is limited somehow?

RSS is a data format, just like HTML.
If you want to get different data, then the server has to generate different data.
That needs server side code to be designed to generate different RSS (or different static files to be created).

Related

Searching RSS feed

I have a RSS feed with more than 5000 items in it. In the user interface, I'm trying to have search feature with ability to do custom search based on different categories. First when the page loads I'm just showing the first 10 feeds which loads really quick as its supposed to be, but when we enter a string to search with a category selected, the processing is pretty slow. I want to know if there is a way to do this more efficiently than going through each and every feed item every single time.
I'm not adding any code here because I'm looking for ideas for handling/searching such large rss feeds. So far I have been using PHP (simple XML) and JavaScript.
RSS (and XML in general) are great data transport formats. They are not good formats for accessing that data via random access.
Import the feeds into a database (properly, don't just dump the raw XML in there) such as Postgresql or MySQL and use a full text search provided by the database server.
Don't use SimpleXML for this. (In fact, it really shouldn't be used at all). Rather, use the DOMDocument class to parse through your XML.
You can use a session variable to store all the feeds. Also in the background have a polling script which checks for new feed. If you get one, add it to the session. Use the session variable to search the feed.

RSS Feeds - add serverside (PHP) or clientside (JavaScript/jQuery)

A quick Google search of "jquery rss parser" returns many cool plugins.
That being said, what are the pros and cons of adding rss content to my website using server-side versus client-side technology?
It could be cool to implement it client side, as then you could build really cool user interface, where new RSS items are fetched every few secs / mins (consider Masonry plugin). Client side would allow you to load RSS feeds and display them as soon as content loaded from a source, rather than waiting until all feeds are loaded.
Server side - you would have to consider some sort of caching as parsing feeds may be very time consuming and no one likes waiting....
Here a few pros and cons:
PROs
Content Dynamically Updated
Can be flexible to drive the most relevant content to the visitor
Allows you to style and manipulate the data to keep the site looking consistant
CONs
Client side requires javascript to be enabled on the browser/device.
Server side while more versatile may require additional installation of modules on the server to work properly
Server side will not auto update without a page reload
RSS Feed structure could change requiring a rewrite of your code.
RSS Feed not outputting properly causing your site not to show the right information (improper tag use or unescaped characters)
May not be updated right away, I know a few feeds that update on a weekly basis
If you are looking for a way to add content to your site. Look into creating or using a Content Management System. There are available plugins that do the same and will allow you some control over how the data is displayed or interpreted, not to mention can also cache an older feed. A list of most common Content Management Systems can be found here: http://en.wikipedia.org/wiki/List_of_content_management_systems
I was looking for a list like the following:
Benefits of using client-side technology for RSS feed:
Content can be updated without page reloads
Content can be sorted/manipulated without page reloads
Benefits of server-side technology for RSS feed:
Improves SSO
Doesn't require the client to have JavaScript enabled.

How to generate RSS feeds and provide to the users

i am currently developing a website where i need to generate RSS feeds and provide to the users to get frequent updates.
Please guide me on how to do this...
Thanks a lot.
Regards,
Gourav
Creating a custom rss feed with php.
You definetly need to do some google searches before you start to post questions like this ( there may be millions of ways to aproach this ) .
An RSS feed is basically just an XML document which you serve on the internet, just like a regular web page. A typical approach is to read your data from a database, convert it into a raw XML format, and then apply an XSLT to convert it to RSS. You don't have to use a database though, hand-edited XML files would, theoretically speaking, work as well.
The wikipedia article on RSS ( http://en.wikipedia.org/wiki/RSS ) should get you started on the file format and how to embed it into your web pages.
Use Yahoo's BOSS API, i used it for my iPhone app of similar nature to what you want to do. Its free and they dont limit your IP requests :)

How to create rss feeds (.xml) for our own dynamic site while using php and mysql?

I've tried every method that I knows but didn't got the solution on "How to create an rss feeds and sitemap for a dynamic site that get updated automatically".
The basic idea is to have your php file generate a valid RSS (xml) based on your database results. So, select the data you want to show from the MySQL db, and output them, conforming to the rss standard.
Check the top three google results
For the sitemap it will be a little harder, and it greatly depends on your structure, which is unknown to us. But the principle is the same - output a valid xml file conforming to the sitemap standard, based on the pages you want to show.

get a list of all the xml pages on a website

using php how do I go to a website and receive a list of all the xml files on a site. (It would also be nice to get the last date changed also)
There is a html files linking to html pages with a xml counterpart, does that help?
You might want to use SimpleXML or file_get_contents function depending on your requirements.
Depends on what you mean by "list of all xml files". There's no way to find unlinked files without a brute force search (which is impossible in practice at this scale). If you only care about linked files, you'll either have to crawl manually and match links in the content of the pages, or do a Google search with site:example and inurl:.xml then parse the results.

Categories