Code: Select all
$content = preg_replace('#src="([^"]+?)#im', "src=\"".$websiteurl."/$1", $content);That's all nice and dandy until one image tag already has a domain infront of the image src...
Is there anyway to only make the above happen if it does not detect a http:// or https:// in the src=""?