Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/08/2013, 09:51
omarinfinito
 
Fecha de Ingreso: enero-2012
Ubicación: <?php echo"Los teques"; ?>/////estado miranda
Mensajes: 196
Antigüedad: 12 años, 3 meses
Puntos: 9
Respuesta: Liberia para importar media de distintas plataformas (youtube, vimeo, slid

Código PHP:
Ver original
  1. <?php
  2. if ($_POST){
  3. $pagina = $_POST['pagina'];
  4. $paginaobtenida = explode(".", $pagina);
  5. $youtubeid = explode("=", $pagina);
  6. if (($paginaobtenida['0'] == "www.youtube") OR ($paginaobtenida['0'] == "http://youtube") OR ($paginaobtenida['0'] == "http://www.youtube") OR ($paginaobtenida['1'] == "youtube")) {
  7. ?>
  8. <iframe width="ancho" height="alto" src="http://www.youtube.com/v/<?php echo $youtubeid['1']; ?>" frameborder="0" allowfullscreen></iframe>
  9. <?php
  10. } elseif (($paginaobtenida['0'] == "www.slideshare") OR ($paginaobtenida['0'] == "http://slideshare") OR ($paginaobtenida['0'] == "http://www.slideshare") OR ($paginaobtenida['1'] == "slideshare")) {
  11. ?>
  12. <iframe src="<?php echo $pagina; ?>" width="ancho" height="alto" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="max-width:427px;border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>
  13.  
  14. <?php
  15. } else { echo "la pagina no es youtube ni slideshare"; }
  16. }
  17.  
  18. ?>

Lo probe y solo funciona el de youtube, no se como obtener el id del slideshare