Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/04/2013, 10:46
Avatar de Manuellama
Manuellama
 
Fecha de Ingreso: noviembre-2006
Ubicación: Zafra, Extremadura, Spain, Spain
Mensajes: 174
Antigüedad: 17 años, 6 meses
Puntos: 10
Información Código descargar videos Dailymotion sólo funciona en localhost

Buenas, he programado un código esta tarde para descargar videos de Dailymotion... (sí, uno que se aburre). Y sólo funciona en localhost debido a la seguridad de dominio o yo que sé...

A ver si alguien sabe cómo resolver esto.


Código:
<?php if (isset($_GET[“video”])) { $nightlymotion = rawurlencode(file_get_contents($_GET[“video”])); function getContentFromDelimiters($string, $start, $end) { $pos = stripos($string, $start); $str = substr($string, $pos); $str_two = substr($str, strlen($start)); $second_pos = stripos($str_two, $end); $str_three = substr($str_two, 0, $second_pos); $unit = trim($str_three); return $unit; } $url = rawurldecode(rawurldecode(getContentFromDelimiters($nightlymotion,”hqURL%2522%253A%2522”,”%2522%252C%2522”))); $url = str_replace(“\/”,”/”,$url); print '<a href=”'.$url.'“download=“video”>Download your video</a>'; }else{ print “Usage: Enter this url in the browser of your choice http://localhost/nightlymotion.php?video=[[url of the video]]”; print ”<br>”;print ”<br>”;print ”<br>”; print “It will download hq quality video if available”; print ”<br>”;print ”<br>”;print ”<br>”; print “Like this: http://localhost/nightlymotion.php?video=http://www.dailymotion.com/video/xt56g1_psy-gangnam-style-hd-1080p-official-music-video-hyuna-version_music”; print ”<br>”; print “A link with the video will be shown”; } ?>

Última edición por Manuellama; 15/04/2013 a las 11:05