Ver original$res = preg_replace('@src="([^http://].*?)"@is', 'src="http://dominio.com/$1"', $html);echo $res;