You are here: Re: Func to Turn Relative URLs into Abs URLs « PHP Programming Language « IT news, forums, messages
Re: Func to Turn Relative URLs into Abs URLs

Posted by tom on 10/25/89 11:34

i was thinking of using preg_match to search for Relative URLS
beginning with either a '/' or something other than 'http://',
'https://' or 'ftp://'.

then, since i KNOW the Base HREF, adding the Base HREF to the beginning
of these URLS.

FYI, as background: i'm working with a PHP app that deals with images
found in RSS / Atom newsfeeds. stupidly a lot of applications, blogs,
etc, create newsfeeds containing images with paths relative to the web
root, so all i'd have to do is

(a)detect the relative URLs with a REgEx
(b)add the base href to the start of these relative URLs

 

Navigation:

[Reply to this 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

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