Jump to content

Need To Remove URLS From RSS Feed


Brandon_R

Recommended Posts

Hello Guys,

 

I have this RSS feed. At the bottom of the feed are links to Social Bookmark sites such as DIGG etc. The problem is on my website i already have a social bookmark block so this is just making duplicatie code on the site. I need a regular expression to search for the social bookmark links in the RSS feed and remove them or replace it with words such as "Please use this site's built in social bookmarker". I prefer removing the links at the bottom because most members already know of the site bookmarker.

 

Here is a link to the feed:

 

http://feeds.feedburner.com/QJ/PSP

 

At the bottom there are 3 links/images for social bookmark sites. Those are the ones i would like to have removed. Please keep in mind that i'm not the one for stealing content. There is a backlink to the original site at the bottom of the posted so the info you  share with me wont be used to steal.

 

Thank You

Brandon_R

 

 

Link to comment
Share on other sites

So you aren't parsing the feed? That way you could just grab whatever you needed from it. But to remove the three image links from the bottom of each entry, try this:

 

$feed = preg_replace('~<div\b.+?class="feedflare".+?</div>~is', '', $feed);

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.