SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it possible to update an rss-feed automatic without the use of a cronjob??

    Hi all,

    I created a feed.php which when parse create a valid rss.xml. Now I have this on my own server and created a cronjob so it is automaticly parse at 12 o'clock everyday.

    On a other server the hosting company won't let me create a cronjob. So I was wondering if there is another way to automaticly parse my feed.php?

    any suggestions???

  2. #2
    SitePoint Addict Quaint's Avatar
    Join Date
    May 2004
    Location
    Netherlands
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you just parse the file when someone accesses it? Every time a user or some other file loads your file, it first parses and then sends data through like normal. You could even build in a little check to see if you haven't parsed already that day...

    I assume you can do this (instead of cronjob), because you only need to parse when the data is actually shown..

    If this isn't clear enough, get back to me

    Quaint Tech
    - Blog on web development and web technology.

  3. #3
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm, tx for your reply I think I see what you mean.

    So it would be enough to point a news reader to http://www.mysite.com/rss/feed.php

    And change my index source from
    PHP Code:
    <link rel="alternate" type="application/rss+xml" title="My RSS feed" href="http://www.mysite.com/rss/feed.xml" /> 
    code to
    PHP Code:
    <link rel="alternate" type="application/rss+xml" title="My RSS feed" href=http://www.mysite.com/rss/feed.php /> 
    But would this be valid, because of the .php extension?

    Second, do you know if all feed readers can parse a .php file? Or are they just looking for .xml?

    Tx in advance

  4. #4
    SitePoint Addict Quaint's Avatar
    Join Date
    May 2004
    Location
    Netherlands
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think that would we valid, as long as you output valid XML using PHP! I suppose this should work, perhaps someone can confirm (or not) this for us?

    Quaint Tech
    - Blog on web development and web technology.


Bookmarks

Posting Permissions

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