[php]Facebook Video Downloader

nixnash

Power Member
Joined
Oct 26, 2009
Messages
600
Reaction score
213
Code:
<center>
<title>Facebook Video Downloader</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<form name="pr" action="" method="post">
<table align="center">
<td><input id="boton" type="text" name="web" size="50" maxlength="110" value="<?php echo $web; ?>"></td>
  <td> </td>
  <td><input id="boton" type="submit" name="submit" value="Descargar Video"></td>

</table>
</center>
<?php
ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9');
if(isset($web)&&($web!= "")&&(isset($submit)&&($submit != "")))
{
function obtener_key($url,$inicio='',$final){
$source = @file_get_contents($url)or die('No Hay Conexion');
$posicion_inicio = strpos($source, $inicio) + strlen($inicio);
$posicion_final = strpos($source, $final) - $posicion_inicio;
$found_text = substr($source, $posicion_inicio, $posicion_final);
return $inicio . $found_text .$final;
}
$limpio= obtener_key($web,'"video_src"','");');
$limpio = str_replace("%3A",":",$limpio);
$limpio = str_replace("%2F","/",$limpio);
$video_url=explode('"',$limpio);

echo '<center><a href="'.$video_url[3].'">Descargar Video</a></center>';
}
?>

Hope it helps.
Thanks are appreciated
 
i didn't see facebook can view video public?
i tried my own video
 
Back
Top