<
?
función relativa_a_absoluta($contenido, $feed_url) {
preg_match('/(http|https|ftp):///', $feed_url, $protocolo);
$server_url = preg_replace("/(http|https|ftp|noticias):///", "", $feed_url);
$server_url = preg_replace("//.*/", "", $server_url);
si ($servidor_url == '') {
devolver $contenido;
}
if (isset($protocolo[0])) {
$new_content = preg_replace('/href="//', 'href="'.$protocol[0].$server_url.'/', $content);
$new_content = preg_replace('/src="//', 'src="'.$protocol[0].$server_url.'/', $new_content);
} demás {
$nuevo_contenido = $contenido;
}
devolver $nuevo_contenido;
}
?>