Using an RSS Feed (This is Easy)

Discussion in 'XML & RSS' started by yfs1, Jan 5, 2005.

  1. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #21
    Try a sample php test file that prints hello just to test that PHP is working. If that is successful then the likely culprit as mentioned before would be the port 80 issue.

    Just a side note, although this works with my regular provider, as a test I opened a cheap go daddy account and it works perfect with no modification (for me anyway). I don't particularly like go daddy but if it can work there, any competent host should be able to set it correctly to view.

    Also - If you are running html pages, it may seem obvious, but be sure your host actually has php enabled. They may list what version is available in their documentation but may not have it enabled for your account.

    Hope that helps

     
    yfs1, Jan 8, 2005 IP
  2. ferret77

    ferret77 Heretic

    Messages:
    5,276
    Likes Received:
    230
    Best Answers:
    0
    Trophy Points:
    0
    #22
    I created basically the same thing except it takes the rss feeds from a .txt file

    so I could put hundreds of them in there

    the link is my sig
     
    ferret77, Jan 8, 2005 IP
  3. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #23
    Thanks for the add feret. Certainly if you are rotating more than 5 ads that would be the way to go. Its also nice if you are adding to a lot of pages as its just an include.

    Interesting site, I see you arent a big Robert Novak fan :D

     
    yfs1, Jan 8, 2005 IP
  4. ferret77

    ferret77 Heretic

    Messages:
    5,276
    Likes Received:
    230
    Best Answers:
    0
    Trophy Points:
    0
    #24
    yeah I don't like him but I can't help watching him some sort of morbid fascination
     
    ferret77, Jan 8, 2005 IP
    yfs1 likes this.
  5. DangerMouse

    DangerMouse Peon

    Messages:
    275
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #25
    Thanks crafty, I'm checking that out now... ;)
     
    DangerMouse, Jan 10, 2005 IP
  6. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #26
    I didn't forget you wormman - I am looking into how to treat the "Make your own Feed" that you sent me. I didn't realize that existed.

    Cheers

     
    yfs1, Jan 10, 2005 IP
  7. Thewormman

    Thewormman Peon

    Messages:
    95
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #27
    No problem, one thing I have learn't from SEO is patience...patience...

    Anyway it isn't costing me anything so when you can is fine :D
     
    Thewormman, Jan 10, 2005 IP
  8. crafty

    crafty Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #28
    Thanks YSFI, Danger and others.

    I am making some progress .....at last.
    I can get feeds going o/k as you suggest YSFI but I have to rename pages .php
    instead of .html
    Is there a simple solution to this?
    many thanks
    Tony
     
    crafty, Jan 10, 2005 IP
  9. DangerMouse

    DangerMouse Peon

    Messages:
    275
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #29
    .htaccess file in the root of you web folder and add this line to it.

    AddType application/x-httpd-php .php .htm .html

    This will server pass all of your html files and will slow you down... I'm not sure how you make it server pass 1 file? Anyone else?
     
    DangerMouse, Jan 10, 2005 IP
  10. crafty

    crafty Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #30
    Thanks Danger
    Slowing down is a bit of a problem.....I feel the need for speed!
    My host has provided the following reply to setting things up so that it could be used on html pages:

    "I would have to change server configuration for everyone so I'll have to give that some thought before agreeing to do so. In the mean time, saving a few pages that require the php extensions is a pretty easy thing to do and you will have to stick with that method until I can research how this might effect my other customers."

    I appreciate all your assistance
    Tony
     
    crafty, Jan 10, 2005 IP
  11. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #31
    If my hosting provider gave me a BS reason like that, I would change providers. There is so much competetion today you can easily find a host that will do what is a very simple and accepted practice.

    Don't accept your web host telling you to come up with a workaround. You pay them!

    Instead tell them if they are unwilling to do it then you will be required to change hosts. Its your site so take control!

    I always see replies like this as unprofesional and they are probably going to be a problem with other things as your site grows.

     
    yfs1, Jan 11, 2005 IP
  12. crafty

    crafty Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #32
    Thanks to you all it looks like I am up and running
    see note just received from host below:
    Very grateful to forum members for your help.
    Tony

    "SSI is enabled on your server. Test file below. If you see a couple dates - it's working
    I've also changed server settings so you no longer need to name a page with the php extension."
     
    crafty, Jan 11, 2005 IP
  13. dakar

    dakar Active Member

    Messages:
    203
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    83
    #33
    Just tagging.... want to give the php method a whirl... looks like it'd be better than the python method I have in place now.
     
    dakar, Jan 13, 2005 IP
  14. DangerMouse

    DangerMouse Peon

    Messages:
    275
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #34
    Careful of that crafty, it sounds like they've set your server up to server pass all html pages - this WILL slow down you pages, even the one's without any php code...
     
    DangerMouse, Jan 13, 2005 IP
  15. Trance-formation

    Trance-formation Peon

    Messages:
    598
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #35
    I've just tweaked magpie to show descriptions, and to truncate them if they are too long.

    The only problem I had with magpie is that the code they suggest (in the cookbook) to limit the number of news items is wrong... if you need the error pointing out, mail me because I haven't got the code here, but it's a simple error
     
    Trance-formation, Jan 13, 2005 IP
  16. Refrozen

    Refrozen Peon

    Messages:
    318
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #36
    What feeds are you using for the news on kwikgoblin. My website (www.refrozen.com) has an RSS feed for world news, but, all it really is is a compilation of other feeds so I am interested.
     
    Refrozen, Jan 13, 2005 IP
  17. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #37
    I am using the ones I give in my example for my main page. There are literally millions of feed at www.syndic8.com (plus I believe you can submit yours)

    Just be careful to look closely at them by clicking the RSS button as there are some crap ones there. I use the search functionality to get the subject I want.

    Does someone have a PHP addition to my code to limit the amount of results listed (as mentioned earlier). There are a few good feeds I would like to use but they are so big by the end of the day. I prefer to not display more than 5 or so.

    Cheers
    PS. Thanks for the good feedback so far (reputation) on this thread. I will be sure to post more cut and paste stuff.
     
    yfs1, Jan 14, 2005 IP
  18. Trance-formation

    Trance-formation Peon

    Messages:
    598
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #38
    Magpie RSS (http://magpierss.sourceforge.net/) uses an array to hold the data and then uses array slice to limit the number displayed

    $num_items = 10;
    $rss = fetch_rss($url);

    $rss->items = array_slice($rss->items, 0, $num_items);

    I'm not up to your level of coding so I don't know if that is any help:)
     
    Trance-formation, Jan 14, 2005 IP
  19. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #39
    I was wondering how you do that. I did it differently, however yours is better.
     
    TwisterMc, Jan 14, 2005 IP
  20. crafty

    crafty Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #40
    Thanks for the tip Danger.
    I have not noticed any difference in loading times but you could be right.
    ( Are you backing any winners?)
    Agree with what ysfi says re feeds at syndic8 .
    Plenty from which to choose but also plenty of crap.
    Only consider feeds that have some sort of a track record as some seem to "fall off the perch" pretty quickly while others are updated infrequently.
    Cheers
    Tony
     
    crafty, Jan 14, 2005 IP