Relative to Absolute URL PHP

ZIP file which contains PHP files with functions can be downloaded here

The file includes these 2 functions:

convertRelativeToAbsoluteURL($baseAbsoluteURL, $relativeURL) – returns converted absolute URL from $relativeURL according $baseAbsoluteURL
convertCSSRelativeURLsToCSSAbsoluteURLs($baseAbsoluteURL, $cssContent) – returns modified CSS content with relative URLs inside url() sections replaced with absolute URLs according $baseAbsoluteURL

These functions were originally pubslihed on http://www.moyablog.com/2011/10/19/how-to-convert-relative-urls-to-absolute-urls-in-websites-using-php/

8 thoughts on “Relative to Absolute URL PHP”

  1. Pingback: dfv.net.pl
  2. Pingback: buy ArcheAge Gold
  3. Pingback: Runescape Gold
  4. Pingback: buy RS Gold

Leave a Comment