Support » Fixing WordPress » Locating and Reading RSS Feeds with cURL

  • QUESTION: How does one go about locating one’s RSS2, ATOM, or other feed using cURL?

    I have now tried the following four URLs and am beset with failure each time.

    $url = “http://www.grammarcaptive.com/feed”;
    $url1 = “http://www.grammarcaptive.com/wordpress/feed”;
    $url2 = “http://www.grammarcaptive.com/wordpress/index.php/feed”;
    $url3 = “http://www.grammarcaptive.com/wordpress/index.php/feed/rss2”;

    I am beset with the following responses:

    1) Not Found
    2) Oops, That page cannot be found
    3) [nothing]
    4) Moved Permanently

    Also, if you have a suggestion with regard to the appropriate cURL commands that would be useful in parsing my feeds once they are located; it would be very helpful.

    Roddy

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern

    (@sterndata)

    Support Team Volunteer

    http://www.grammarcaptive.com/is not a WordPress site.

    Moderator Steven Stern

    (@sterndata)

    Support Team Volunteer

    If I look at http://www.grammarcaptive.com/wordpress/ and view the page source, I see

    http://www.grammarcaptive.com/wordpress/index.php/feed/

    as your default RSS feed.

    OK. I have managed to open the page with a Chrome browser.

    Do you have any suggestion in regard to the cURL options that would permit me read and edit the page? For the ones that I am using have proven ineffective. They indicate a string with zero bytes, and clearly the page is full.

    Moderator Steven Stern

    (@sterndata)

    Support Team Volunteer

    When I view the feed, it shows your posts in a valid RSS format.

    kiusau:

    OK. I have managed to open the page with a Chrome browser.

    Steve:

    When I view the feed, it shows your posts in a valid RSS format.

    My goal is to read the feed with cURL. Are you knowledgeable in this area?

    This suggested piece of code draws a blank when the URL is replaced with http://www.grammarcaptive.com/wordpress/index.php/feed

    You might be able to help by telling me the exact name of the file. “http://www.grammarcaptive.com/wordpress/index.php/feed” is not a file name, it is a folder name. This could explain why cURL is returning an empty string.

    If you are able to provide the file name, please tell me where you found it, so that I might discover whatever else is in the same folder.

    I suspect that there is more than one xml/rss file.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Locating and Reading RSS Feeds with cURL’ is closed to new replies.