[PHP] RSS Feed Integration - Help!

Right, the previous code to open in new windows didn't work but I've used the code from before that and just set the page default to open in a new window and that is working fine. I'm not sure what to modify in the code to get the DESCRIPTION to show up:

Code:
        if ($this->__in_item && $name == 'TITLE') {
            $this->__store['title'] = true;
        } elseif ($this->__in_item && $name == 'LINK') {
            $this->__store['link']  = true;
        } elseif ($this->__in_item && $name == 'DESCRIPTION') {
            $this->__store['desc']  = true;
        } elseif ($this->__in_item && $name == 'PUBDATE') {
            $this->__store['date']  = true;
        } else {
            $this->__store['title'] = false;
            $this->__store['link']  = false;
            $this->__store['desc']  = false;
            $this->__store['date']  = false;

I presume it's something to do with that but a lot of this is flying straight over my head :nervous:

Again, I can't thank you enough for your help.
 
have you read my last post?? You shouldnt need to change anything in the file
 
can you show me the code you are using in combination with the parser so that I can test and bugfix anything which is out of place.

edit - Just checking the URL http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/uk_technology/rss.xml it doesnt seem to point to anything. I get a 404 as is the script. Check the URL for the feed.

it would appear that the correct URL for the feed is here. I think it was me who first typed that URL, but that was just a guessed example based on the uk_politics/rss.xml feed address.
http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/technology/rss.xml
 
Last edited:
I've attached the entire code for that page, with the updated link to the technology section. I've also noticed that the last link in the RSS list is always the same and points to http://news.bbc.co.uk/go/rss/-/1/hi/uk_politics/81344.stm and I've tried changing the number of feeds to be displayed and always the last post points to that page. Weird.
 

Attachments

  • test2.php
    4 KB · Views: 136
that is very strange indeed. Am checking over the parsing now will try to have a fixed version for you as soon as I can

[UPDATE] that was a very strange error indeed, a logic one which had some weird effects. The loop which operates to only store the max_entities amount of data into the storage array was constantly evaluating to true due to the way in which I had implemented the condition and the point at which new items were added to the array.

Version 1.7
- [bugfix] Logical error causing erroneous results for last returned item information

Version 1.6
- New Feature: debug information is now available post parsing.

Yep, thats right, jumped two versions. The original bugfix for 1.6 didnt operate properly, so this was reworked in v1.7

Christ I am just climbing that version ladder arent I. Now is that a good or a bad thing??
 

Attachments

  • class.rss_parser.php
    9.6 KB · Views: 129
Last edited:
EDIT: It's all sorted, I've got it exactly as it should be! Thanks for all your help mate.
 
Last edited:
Well, I have tried this but I cannot get the descriptions to work either. If you guys know how please tell me because I really like this script.
 
This is a really great tool -- glad I came across this thread!

Is there an easy mod to this to pull in the entire body of each post, rather than simply the title/description type info? I'm trying to get a friend set up so that he can update his list of upcoming events in his blog in a single post, and then have that pulled via RSS feed into his website (he has no knowledge of HTML, no FTP/editing software, etc.).

Thanks for any help anyone can give me with this...

- Brian -
 
The RSS description field contains the body of the content. Though the amount of the body which is provided within the description tag varies from feed to feed.

I might update this so that it is able to pull all of the standard fields out the feed though like category and so on.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,623
Latest member
AndersonLo
Back