Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/10/2009, 05:16
samu22
 
Fecha de Ingreso: abril-2008
Mensajes: 453
Antigüedad: 16 años, 1 mes
Puntos: 16
Respuesta: Problema al tratar vídeos de Youtube en RSS

hola como te va, prueba con algo asi


Código php:
Ver original
  1. <content:encoded><![CDATA[<?php echo ereg_replace("<object width=\"([^\"]+)\" height=\"([^\"]+)\" type=\"[^\"]+\" data=\"http://www.youtube.com/v/([^\"]+)\"[\n\r]*[^<]*<param [^>]+>[^<]*<param[^>]+>[^>]*</object>", "<object width=\"\\1\" height=\"\\2\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\3\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/\\3\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"\\1\" height=\"\\2\"></embed></object>", $texto); ?>]]></content:encoded>

lo que hace es reemplazar el objet data por parametros de una forma valida