Iliustracijų korekcija RSS agregatoriuose


Žymės: php,html,rss,regexp


Flying monkeys stole my icon

Neretai pasitaiko, jog tinklaraščių įrašuose kelias iki iliustracijų yra pateikiamas reliatyviai (pvz.: <img src="/images/" />). Analogiškas HTML kodas bus pateikiamas ir to tinklaraščio RSS šaltinyje, todėl RSS skaitymo programose arba agregatoriuose tokia iliustracija daugeliu atveju nebus atvaizduota (nes bus ieškoma ne tinklaraščio, o agregatoriaus serveryje).

Šiai situacijai yra du sprendimo būdai: iliutracijų korekcija RSS šaltinyje arba RSS skaitymo programoje ar agregatoriuje (daugelis jų atlieka šį veiksmą).

Pateikiu PHP kodą, kuris tinka abiejais atvejais. Jis HTML kode esantiems paveikslėliams preprend'ina HTTP host'ą:

// Tekstas, kurį reikia išparsinti:
$blogEntry 'Kažkoks blogo įrašo tekstas<b>
<img src=""
alt="Logo" /></b>
<img alt="Logo"
src="/img/cards-125x125.jpg" width="125" height="125" />'

// RSS'o URL, iš kurio parsinam įrašus (-ą)
$blogUrl '';

$parsedUrl parse_url($blogUrl);

// Išparsintas įrašas:
$parsedEntry preg_replace('/(<\s*img [^\>]*src\s*=\s*[\""\']?)(\/[^\""\'\s>]*)/i''\\1'.$parsedUrl['scheme'].'://'.$parsedUrl['host'].'\\2'$blogEntry);




Louis Vuitton Shoes (2012-08-26 10:34:28)
Great post! I'll subscribe proper now wth my feedreader computer software!
Michael Kors Purses Cheap (2012-09-02 18:58:11)
I found your blog site on google and check several of the early posts. Continue to keep up the good work. I just added up your RSS feed to my MSN News Reader. Looking forward to reading through far more from you later on!
Cheap Michael Kors Purses (2012-09-03 03:25:57)
Hi, exactly where did you get this info can you please support this with some proof or you might say some very good reference as I and others will actually enjoy. This details is actually great and I will say will usually be helpful if we attempt it possibility free. So if you can back it up. That may really support us all. And this may well bring some good repute for you.
Louis Vuitton Purses Outlet (2012-09-03 09:56:41)
As usual this was a thoughtful submit today. You make me want to preserve coming back and forwarding it my followers?-.
Coach Purses (2012-09-08 09:48:02)
Positive glad that I navigated in your web page by accident. I'll be subscribing to your feed in order that I can get the latest updates. Appreciate all of the details right here
michael kors outlet (2012-09-09 08:45:42)
Government market allocation of human resources is the government's human resources optimization configuration needs. In the talent resource allocation process, the Government is facing hundreds of millions of human resources and millions of employer of human resources to achieve comprehensive
LV Outlet (2012-09-14 10:58:45)
That is definately one of the best blogs I've sen in ages online. Maintain up the excellent posts.
Cheap Jordans (2012-09-19 12:09:35)
That is some inspirational stuff. Never knew that thoughts might be this varied. Many thanks for all of the enthusiasm to offer such beneficial data right here.
Coach Outlet (2012-09-20 08:02:45)
Hello there, I should say it is a clever posting. I'll certainly be seeking in on this web site yet again soon.
louis vuitton outlet (2012-09-26 10:30:35) louis vuitton outlet
moncler jassen (2012-10-20 13:29:33)
ou make me want to preserve coming back and forwarding it my followers?-.
Louis Vuitton Outlets (2012-10-27 07:50:05)
I'll be subscribing to your feed in order that I can get the latest updates. Appreciate all of the details right here
michael kors outlet (2012-09-09 08:45:42)
jvgaueq (2012-11-19 20:45:49)
vyutli (2012-11-19 22:02:29)
viagra (2012-11-23 00:43:51)
gaqkjgpe <a href=" ">jlmubn</a> [url=]jlmubn[/url]
viagra (2012-11-23 00:46:46)
rgljinl <a href=" ">lmqobye</a> [url=]lmqobye[/url]
viagra (2012-11-23 03:58:05)
qehmqql <a href=" ">lppxsxtr</a>
viagra (2012-11-23 03:59:01)
tcenror <a href=" ">fowyfxj</a>
viagra (2012-11-23 05:51:10)
tsfefv [url=]bgtbou[/url]
viagra (2012-11-23 05:51:43)
ibicixy [url=]zycdxd[/url]
viagra (2012-11-23 07:48:21)
viagra (2012-11-23 07:48:54)
cheap beats by dre (2012-11-26 14:01:42)
I don't remember when I first knew cheap beats by dre,but I can sure that I love it since I get it.I still remenber how excited I am when I get from beats by dre sale.I think if you have wholesale beats by dre,you will love it always too.
cheap michael kors handbags (2012-11-26 14:01:54)
How amazing the cheap michael kors handbags is can you image?I think it is really hard.I like the michael kors handbags outlet because it it the one that makes me love it.michael kors factory outlet always makes miracles for us who like handbags.Aren't you?
buy viagra (2012-12-08 01:24:37)
payday loans (2012-12-11 00:24:00)
julugpr (2012-12-21 20:03:22)
payday loans (2012-12-30 21:48:32)
swtwizb (2013-01-04 04:44:35)
generic viagra (2013-01-09 21:21:37)
quick quid (2013-01-20 14:43:02)
cheap viagra online (2013-01-24 05:15:27)
viagra online (2013-01-26 05:40:22)
payday loans (2013-01-27 01:58:18)
buy viagra online (2013-01-28 22:29:47)
pay day loans (2013-01-28 23:01:39)
pay day loans (2013-01-30 09:06:52)
pay day loans (2013-02-01 22:22:08)
buy viagra online (2013-02-03 22:40:59)
pay day loans (2013-02-06 22:17:33)
no fax payday loans (2013-02-09 02:37:15)
generic viagra online (2013-02-17 19:52:22)
レイバン ウェイファーラー (2013-05-12 06:24:11)
Hjemmesiden nem at navigere rundt på. Ekspeditionen fantastisk hurtig. Your opinion is valuable I am. Thank you!
ルブタン 靴 (2013-05-12 08:27:00)
Altid et godt tilbud,Har handlet her masse gange og service og levering er helt i top.
メガネ ポリス (2013-08-19 13:52:09)
"Jeg bestilte i tirsdags et par konfirmationssko til min datter, og i dag modtog jeg dem med posten. Tusinde tak for et fantastisk site, og service. Det er imponerende, at I kan sende så hurtigt og til så en billig penge. Skoene passede perfekt, og min datter elsker dem! "
michael kors outlet (2013-08-30 10:51:46)
Latest stylish Michael Kors Handbags Sale Online, large range of top quality michael kors purses,bags & wallets at michael kors online store are hot sale,you can enjoy the lowest price michael kors outlet on MK Online Store now!
canada goose sale (2013-11-18 15:14:21)
Intet slår Billignikefree!!! (2017-09-08 08:53:30)
I’m really impressed with your article, such great & usefull knowledge you mentioned here
Economics Homework Help (2017-09-08 12:39:21)
I personally like your post; you have shared good insights and experiences. Keep it up.
oil furnace tune up (2017-10-03 10:23:57)
Helping men close that gap could reap economic benefits for them, their families and the community.
this site (2017-10-08 11:35:22)
I was taking a gander at some of your posts on this site and I consider this site is truly informational! Keep setting up..
visqueen (2017-10-09 09:59:23)
Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts.
cheap holidays to morocco (2017-10-09 10:42:54)
Extremely pleasant article, I delighted in perusing your post, exceptionally decent share, I need to twit this to my devotees. Much obliged!.
go to this website (2017-10-10 11:54:32)
To stay financially fit and monitor your progress, consider completing these questions annually. Keeping your results in a binder will help you track your progress each year. A little preparation once a year can go a long way to secure your financial future for you.
importation business (2017-10-10 14:04:30)
I am happy you take pride in what you compose. This makes you stand way out from numerous different scholars that push ineffectively composed substance.
Pregnancy Miracle (2017-10-10 20:06:02)
This web journal is truly extraordinary. The data here will clearly be of some help to me. Much appreciated!.
Dry mouth (2017-10-11 12:55:54)
Nicorinse removes tar and nicotine from your mouth, gums, teeth, tongue and throat for better oral health and protection all year long. It might even help you quit tobacco.
cheap 55 print (2017-10-12 18:48:19)
Awesome post, and incredible site. A debt of gratitude is in order for the data!
Accounting Assignment Writing Help (2017-10-14 07:40:33)
I’m really impressed with your article, such great & usefull knowledge you mentioned here
Managerial Accounting Homework Help (2017-10-14 07:41:04)
Pretty helpful material, much thanks for this article
Questions to ask your boyfriend (2017-10-15 10:41:42)
The city cannot require the privately owned course to stay in operation even if parts of the land are stipulated to have an 18-hole golf course. Without another golf course operator purchasing the land, the vacant land could turn into an unkempt dirt lot, which carries its own set of concerns for public safety and crime, Valenzuela said. (2017-10-15 12:42:19)
This is the kind of data I've long been attempting to discover. Much obliged to you for composing this data.
escorts beirut (2017-10-17 18:57:33)
Pleasant to be going to your web journal once more, it has been months for me. Well this article i've been sat tight for so long. I require this article to finish my task in the school, and it has same theme with your article. Much appreciated, awesome offer.
Prabhas images (2017-10-18 12:43:37)
I respect this article for the all around looked into substance and magnificent wording. I got so included in this material that I couldn"t quit perusing. I am awed with your work and expertise. Much thanks to you to such an extent.
Lean Belly Breakthrough (2017-10-20 17:06:15)
I am upbeat to discover this post Very helpful for me, as it contains parcel of data. I Always want to peruse The Quality and happy I discovered this thing in you post. Much appreciated
correx (2017-10-21 10:29:12)
Respecting the time and exertion you put into your site and point by point data you offer!..
Jimmy Hogg (2017-10-21 10:55:12)
The site is looking piece ostentatious and it gets the guests eyes. Outline is really basic and a decent easy to use interface.
buy powermill 2018 (2017-10-22 10:32:19)
"I know it's been happening in terms of enrollment and some say boys are getting the short shrift," Higgins said. "I don't necessarily see a problem unless it indicates an inequity in the system, and I don't think that's true."
High TF links Low obl (2017-10-22 13:16:57)
I might want to thank you for the endeavors you have made in composing this article. I am trusting the same best work from you later on too. Much appreciated...
Language of Desire (2017-10-22 19:08:58)
Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon!
escort ln lebanon (2017-10-23 19:25:46)
Thanks for the blog post buddy! Keep them coming...
mobile app development columbus (2017-10-27 15:39:27)
I as of late went over your website and have been perusing along. I thought I would leave my first remark. I don't comprehend what to say aside from that I have delighted in perusing. Pleasant online journal, I will continue going to this site all the time.
Reduce Smoking Risk (2017-10-28 21:29:11)
I am happy you take pride in what you compose. This makes you stand way out from numerous different scholars that push ineffectively composed substance.
invoana side effects (2017-10-30 09:41:36)
I like this post,And I figure that they having a great time to peruse this post,they might take a decent site to make an information,thanks for sharing it to me.
architectural visualization company (2017-10-30 16:43:24)
Thank you for a great post.
Glass repair (2017-10-31 08:56:03)
“You guys at Vista Glass are awesome! Not only did you handle my claim with my insurance within minutes, but you managed to fit me in and accommodate to my time constraints. Thanks for the great service!”
cheapest color copies printing (2017-11-01 10:12:47)
A debt of gratitude is in order for setting aside an ideal opportunity to talk about this, I feel firmly that affection and read more on this point. On the off chance that conceivable, for example, pick up learning, would you psyche overhauling your web journal with extra data? It is exceptionally helpful for me.
beirut escorts (2017-11-01 17:49:14)
valuable data on themes that bounty are intrigued on for this great post.Admiring the time and exertion you put into your b!..
Thomas Paquin Keller (2017-11-04 04:35:33)
Awesome post, and incredible site. A debt of gratitude is in order for the data!
unsecure home improvement loan (2017-11-04 08:28:53)
Incredible post, you have pointed out some amazing focuses, I also trust this is an extremely magnificent site.
escort lebanon (2017-11-07 16:15:13)
The website is looking bit flashy and it catches the visitors eyes. Design is pretty simple and a good user friendly interface.
Friv 2017 (2017-11-13 10:12:45)
Hi I am so charmed I found your online journal, I truly found you by misstep, while I was watching on google for something else, Anyways I am here now and could simply get a kick out of the chance to say thank for an enormous post and an overall captivating site. Kindly do keep up the immense work.
software outsourcing (2017-11-15 09:58:39)
it was a brilliant opportunity to visit this sort of site and I am upbeat to know. much thanks to you such a great amount for allowing us to have this open door..
Latest Gadgets (2017-11-19 09:12:30)
Brands like Tiffany, Cartier, David Yurman, Harry Winston, and Van Cleef & Arpels, for example, repay the brand equity promise. Silver is an attractive bright white metal that can be highly polished. In fact, silver has the most brilliant polish of all the precious metals. The polish of silver can have a mirror finish or a satin look. This makes it a great metal for jewelry.
family portrait photographers (2017-11-20 12:59:29)
Incredible post, you have pointed out some amazing focuses, I also trust this is an extremely magnificent site.
hospitality pr firms (2017-11-25 17:03:33)
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. Thanks...
nonprofit job board (2017-11-30 09:41:58)
Somebody Sometimes with visits your website routinely and prescribed it as far as I can tell to peruse also. The method for composing is magnificent furthermore the substance is first rate. A debt of gratitude is in order for that understanding you give the perusers!
forskolin supplement (2017-12-09 12:34:24)
Incredible overview, I"m certain you"re getting an awesome reaction.
backlinks service (2017-12-13 12:30:54)
Incredible Information sharing .. I am exceptionally glad to peruse this article .. much obliged for giving us experience info.Fantastic pleasant. I value this post.
silver rings online (2017-12-28 10:32:11)
Great post yet I was thinking about whether you could compose a litte more on this subject? I'd be extremely grateful on the off chance that you could expound a smidgen further. Welcome it!

cbd oil (2017-12-31 13:13:08)
An intriguing dialog is value remark. I feel that it is best to compose more on this matter, it may not be a forbidden theme however normally people are insufficient to chat on such subjects. To the following. Here"s to you.
visit (2018-01-11 12:49:09)
You know your activities emerge of the group. There is something exceptional about them. It appears to me every one of them are truly splendid!
Essay Writing Service (2018-01-18 07:41:40)
I loved the way you discuss the topic great work thanks for the share.
Electronics Engineering Assignment Help (2018-01-18 13:02:07)
Such a nice post, keep up the fantastic work
皮秒雷射 (2018-02-03 10:23:57)
A debt of gratitude is in order for setting aside an ideal opportunity to talk about this, I feel unequivocally about it and affection adapting more on this subject. On the off chance that conceivable, as you pick up mastery, would you brain redesigning your web journal with additional data? It is to a great degree accommodating for me. (2018-02-06 12:07:34)
Great site! I genuinely adore how it is simple on my eyes it is. I am considering how I may be informed at whatever point another post has been made. I have subscribed to your RSS which may do the trap? Have an extraordinary day!
high quality backlinks (2018-02-07 15:03:37)
I think that everything has been described in systematic manner so that reader could get maximum information and learn many things.
網頁設計 (2018-02-13 09:59:13)
Good website! I truly love how it is simple on my eyes and the data are well written. I am wondering how I could be notified whenever a new post has been made. I’ve subscribed to your feed which must do the trick! Have a nice day!
Make money online (2018-02-14 13:43:01)
Welcome to a reputable company with a proven track record and firmly established as the biggest internet marketing company in the information product niche. Here you get one on one coaching for 21 steps by the very best and successful internet marketers and entrepreneurs. A small investment of only $49 will give you immediate access to a money making system with a 100% money back guarantee. You've got nothing to lose and everything to gain. Join now!
Escortsinbeirut (2018-02-15 07:45:45)
I have bookmarked your website, the articles are route superior to anything other comparative web journals. The data you have posted is extremely helpful. You have a decent point here! Thank you very much for this.
Sexyescorts in Beirut (2018-02-15 11:01:44)
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. Your perspectives are as per my own generally. This is extraordinary substance for your peruses. thanks for imparted this to us. Lebanon Escorts
Lebanon Escorts (2018-02-15 11:17:27)
I searched your blog on the search engines and check several of your early posts, this is extraordinary substance for us. I really love to read such a nice article. It was a brilliant opportunity to visit this sort of site and I am cheerful to know. I am trusting the same best work from you later on too. Lebanon Escorts
Friv 2018 (2018-02-17 09:05:03)
Hey what a splendid post I have go over and trust me I have been looking out for this comparative sort of post for recent week and scarcely ran over this. Much thanks and will search for more postings from you.
網站製作 (2018-02-21 11:12:31)
your blog is very good. It was very well authored and easy to understand. Unlike additional blogs I have read which are really not good. I also found your posts very interesting
除毛 (2018-02-21 11:12:40)
You really make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand. It seems too complex and extremely broad for me. I’m looking forward for your next post, I will try to get the hang of it!
private lenders ontario (2018-02-21 20:46:26)
Much obliged for the decent blog. It was exceptionally valuable for me. I'm cheerful I discovered this online journal. Much thanks to you for imparting to us,I too dependably gain some new useful knowledge from your post.
Revit software for sale (2018-02-22 08:57:30)
The student bodies at the University of California and California community colleges average about 55 percent female -- slightly less than CSU's 59 percent.
crowdfunding parrainage (2018-02-22 11:23:33)
Great article, This is clearly one extraordinary post. A debt of gratitude is in order for the significant data and bits of knowledge you have so given here.
Private School (2018-02-22 13:36:23)
Wow, awesome blog structure! How long have you been running a blog for? you made blogging look easy. The total look of your site is wonderful, let alone the content material!
obat kuat (2018-02-24 09:26:03)
Thank you for another excellent article. Exactly where else could anybody get that kind of data in this kind of a perfect way of writing? I have a presentation subsequent week, and I am to the appear for such information and facts.
網站製作 (2018-02-27 11:24:41)
Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I get actually enjoyed account your blog posts. Any way I will be subscribing to your augment and even I achievement you access consistently quickly.
除毛 (2018-03-02 20:59:38)
How do I know if a Wordpress theme supports a subscribe option?
judi poker uang asli (2018-03-12 14:06:38)
Much thanks for this valuable article. I like it.
agência de marketing digital (2018-03-14 12:56:20)
I’m impressed, I have to admit. Truly rarely do I encounter a blog that’s both educative and entertaining, and without a doubt, you’ve hit the nail on the head. Your notion is outstanding; the pain is an element that not enough folks are speaking intelligently about. My business is happy that I stumbled across this in my search for something regarding this.
straight from the source (2018-03-18 11:54:04)
there are many greeting card options that you can see in online stores but i love those that generate cute sounds;;
aparelho auditivo (2018-03-18 13:12:40)
Some truly nice and utilitarian information on this web site , likewise I think the design and style holds fantastic features.
play book of ra online (2018-03-27 09:12:15)
Play Book of Ra Classic and variants along with more than 400 Slot machines by Novoline, Netent, and Microgaming without registration!
sofia take care of clover (2018-03-28 10:36:46)
I love this game, it's fun and keeps you on your toes. It's adventures and and time killing game. But I wish there was a check point that you can reach on each level,instead of it starting all over again. But it is a fun game. Thanks Martha Jenks
couples valentine date (2018-03-28 10:37:05)
In truth, really enjoy. ...However the glitchy response in 'jungle 2', is frustrating and makes the global quests impossible to complete and the constant bombardment of ads. irritates beyond description.
ranking bukamcherów (2018-03-31 15:27:27)
Subsequently, after spending many hours on the internet at last We’ve uncovered an individual that definitely does know what they are discussing many thanks a great deal wonderful post
pemainbandarq (2018-04-14 01:18:24)
Your site is truly cool and this is an incredible moving article. Much obliged to you to such an extent.
Roll container (2018-04-25 09:16:32)
I have bookmarked your online journal, the articles are path superior to anything other comparable web journals.. a debt of gratitude is in order for an extraordinary online journal!
Trade show backdrop (2018-04-28 23:27:46)
I am certainly making the most of your site. You certainly have some incredible knowledge and extraordinary stories.
Ripple News (2018-04-29 09:27:01)
Crypto Coinscious provides details based on a market cap in USD and you can sort by rank, name, price, market cap, volume in 24 hours, change in 1 hour, change in 24 hours and available supply. Top Gainers show a list of top trending currencies based on last 24 hours change and Top losers show a list of most price dropped currencies from last 24 hours.
hypnos norrköping (2018-05-07 13:29:05)
Yes i am completely concurred with this article and i simply need say this article is extremely decent and exceptionally enlightening article.I will make a point to be perusing your blog more. You made a decent point yet I can't resist the urge to ponder, shouldn't something be said about the other side !! THANKS !!
Heidi Roizen: Networking or Venture Capitalistism Case Help (2018-05-18 07:19:33)
Thanx for sharing such useful post keep it up :)
Help With Matlab Programming Assignment (2018-05-18 07:43:58)
I’m really impressed with your article, such great & usefull knowledge you mentioned here
Operational Audit Homework Help | (2018-05-18 12:56:31)
only professional writers can make this kind of material, cheers
Ethics And Libel Custom Term Paper Writing Service (2018-05-18 13:25:00)
This is really a great stuff for sharing. Thanks for sharing.
Dissertation Writing (2018-05-25 08:41:47)
This Is Great Information For Students. This Article Is Very Helpful I Really Like This Blog Thanks. I Also Have Some Information Relevant For Online Dissertation Help.
Friv 4 (2018-05-30 00:02:08)
I found your this post while searching for some related information on blog search...Its a good post..keep posting and update the information.
sunshine city parking (2018-05-31 10:09:34)
I think this a great game it is so good sometimes laggy for me it has. Some thing to do with my phone i love ur games keep up the good work and work on new games i would love to see a plants vs aliens but i know if u guys don't want to make my game i said it is ok # PLANTS VS ZOMBIES

(Tinklalapis arba OpenID)