Ver Mensaje Individual
  #13 (permalink)  
Antiguo 24/10/2011, 19:13
charlescuellar
 
Fecha de Ingreso: abril-2008
Mensajes: 310
Antigüedad: 16 años, 10 meses
Puntos: 4
Respuesta: con php se pude hacer esto?

andresdzphp

gracias checandolo de la primero manera funciona bien pero de la segunda la mas simple me da error

Código PHP:
Ver original
  1. Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: URL file-access is disabled in the server configuration in /home/public_html/dominio.com/yt.php on line 2
  2.  
  3. Warning: SimpleXMLElement::__construct(http://gdata.youtube.com/feeds/api/videos/osRddh2HSZI) [simplexmlelement.--construct]: failed to open stream: no suitable wrapper could be found in /home/public_html/dominio.com/yt.php on line 2
  4.  
  5. Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: I/O warning : failed to load external entity "http://gdata.youtube.com/feeds/api/videos/osRddh2HSZI" in /home/public_html/dominio.com/yt.php on line 2
  6.  
  7. Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/public_html/dominio.com/yt.php:2 Stack trace: #0 /home/public_html/dominio.com/yt.php(2): SimpleXMLElement->__construct('http://gdata.yo...', 0, true) #1 {main} thrown in /home/public_html/dominio.com/yt.php on line 2

la linea 2 es esta

$sxe = new SimpleXMLElement('http://gdata.youtube.com/feeds/api/videos/osRddh2HSZI', null, true);