Reply to Re: Func to Turn Relative URLs into Abs URLs

Your name:

Reply:


Posted by tom on 09/26/56 11:34

Hi Alvara,

As an example of the data I'm dealing with, take a look at the
<content:encoded> tags in this newsfeed:

http://www.7inchpunk.com/?feed=rss2

(BTW, that's a great site there !)

I'm using the Magpie (http://magpierss.sourceforge.net/) to parse the
feed. Magpie returns the entire feed elements as array elements. Now I
need a function that searchs for the SRC= part of the <img> tag in the
feed <description>, ie: using a RegEx like

src[^>]*[^/].(?:jpg|bmp|gif)(?:\"|\'|)

And then tests if this contains a Relative or an Absolute URL.

If it's relative it should then simply concatenate, adding the Base
HREF to the start of the relative URL...

Anyone want to try writing such a function ? I think it'll have
applications to other stuff besides parsing newsfeeds...

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация