Något åt detta håll?
[PHP]$htmlContent = file_get_contents("https://www.typiskbildsajt.org/");
$htmlContentModified = str_replace('href="/', 'href="https://www.typiskbildsajt.org/', $htmlContent);
$htmlContentModified = str_replace('src="/', 'src="https://www.typiskbildsajt.org/', $htmlContentModified);
echo $htmlContentModified;
Hämtar HTML-innehållet från webbadressen
$htmlContent = file_get_contents("https://www.typiskbildsajt.org/");
Ersätter alla länkar
$htmlContentModified = str_replace('href="/', 'href="https://www.typiskbildsajt.org/', $htmlContent);
$htmlContentModified = str_replace('src="/', 'src="https://www.typiskbildsajt.org/', $htmlContentModified);
visar den modifierade HTML-koden
echo $htmlContentModified;[/PHP]