Comments on: How to detect the RSS feed for a blog https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/ building stuff on the web with Josh Fraser Fri, 14 Aug 2015 21:06:00 +0000 hourly 1 By: Bodhisattva Builder https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/comment-page-1/#comment-74411 Fri, 14 Aug 2015 21:06:00 +0000 https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/#comment-74411 The php way is better as google only reads the RSS meta hints. With PHP you could also conditionally query known feed urls that the website may not provide meta hints for.

if(@file_get_contents($url)){
preg_match_all(‘//’, file_get_contents($url), $matches);
if(isset($matches[1][0])){
$this->feed->url = $matches[1][0];
}elseif(@file_get_contents($this->feed->url.’/feed’)){
$this->feed->url = $this->feed->url.’/feed’;
}

$this->feed->save();

]]>
By: Frank https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/comment-page-1/#comment-47491 Fri, 15 Aug 2014 16:32:34 +0000 https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/#comment-47491 ThGoogle api is the fastest option, however, it does not detect the feed url sometimes making it quite unreliable. In my tests, it failed to get the feed url for one WORDPRESS blog (It got many others though)!

]]>
By: Bob Barcus https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/comment-page-1/#comment-1244 Sun, 26 Sep 2010 14:38:47 +0000 https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/#comment-1244 I can't get it to work… any help?

]]>
By: @islandsmooth https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/comment-page-1/#comment-907 Tue, 20 Apr 2010 22:29:03 +0000 https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/#comment-907 Just what I needed!

Many thanks!

]]>
By: angelina jolie https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/comment-page-1/#comment-707 Thu, 10 Sep 2009 16:18:44 +0000 https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/#comment-707 I love your site. 🙂 Love design!!! I just came across your blog and wanted to say that I

]]>
By: sandrar https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/comment-page-1/#comment-704 Thu, 10 Sep 2009 14:03:54 +0000 https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/#comment-704 Hi! I was surfing and found your blog post… nice! I love your blog. 🙂 Cheers! Sandra. R.

]]>
By: Josh Fraser https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/comment-page-1/#comment-619 Wed, 29 Jul 2009 22:16:03 +0000 https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/#comment-619 Just noticed that my regexp is order-sensitive (it will break if you put the href attribute in front of the type attribute). Make sure you fix that if you decide to copy and paste.

]]>
By: Josh Fraser https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/comment-page-1/#comment-618 Wed, 29 Jul 2009 22:15:38 +0000 https://onlineaspect.com/2008/06/28/how-to-detect-the-rss-feed-for-a-blog/#comment-618 Just noticed that my regexp is order-sensitive — it will fail if you put the href attribute in front of type. Make sure you fix that if you decide to copy and paste.

]]>