I am loading a url into my page on my local server with PHP file_get_contents. It works fine but relative paths on the site I am pulling obviously fail and default to my localhost.
Does anyone have any advice on how I could swap relative paths of a page I am pulling to absolute ones?
Ive tried something like this but it fails...
$homepage = file_get_contents($theURL);
$homepage2 = str_replace($homepage, "/images", $theURL + '/images');
echo $homepage2;
Thanks!