Скрипт за сваляне от YOUTUBE.COM

Код:
 Моля напишете целия линк.<br>
Пример: http://youtube.com/watch?v=hQSTvkvZmtM </center><center><form method='post' action=''> 
<input type='text' name='video' class='textbox'/> 
<input type='submit' name='submit'value="Давай!" class="button"> 
</form> 
<? 
if($_POST['submit']){ 
$video="$_POST[video]"; 
$video=str_replace("http://youtube.com/watch?v=", "http://cache.googlevideo.com/get_video?video_id=", $video); 
echo"<a href=\"$video\">Сваляне</a><br>$video";} 
?>


този тря бачка
 
http://thinkabdul.com/2006/03/14/tutorialdirect-download-bypass-proxy-for-youtube-videos/
тфа може да е от ползва... :)
Пък може и дан е..
 
Здравейте,

Клипове от www.youtube.com може да сваляте директно и от този ЛИНК: www.iwant2download.tk

Ако някой знае, начин за смятане (логиката) на адреса във vbox , доста полезно ще бъде. Цифрите в mediaXX.vbox....... и т.н.

Поздрави.
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<html>
<head>
<meta http-equiv="Content-Language" content="en-us" />
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<meta name="robots" content="INDEX, FOLLOW" />
<META NAME="Author" CONTENT="@abv.bg">
<META NAME="keywords" CONTENT="">
<meta content="" name="Description">
<meta content="" name="Owner">
<link rel="stylesheet" type="text/css" href="css.css" media="screen" />
<link rel="shortcut icon" href="favicon.ico" >
<link rel="icon" href="animated_favicon1.gif" type="image/gif" >
<title>Свали от Youtube</title>
</head>


<body>
<center><img src="/images/pic2.jpg"></img></center>
<font color="#006699" size="2" face="Arial, Helvetica, sans-serif">
<p align="center">Моля напишете целия линк.<br>
Пример: http://youtube.com/watch?v=hQSTvkvZmtM<br>
</p>
</font>
<form action="" method="post">
<div align="center">
<input type="Text" name="youtubeurl" size="35" class='textbox'>
<input type="submit" name="submit" value="Давай!" class="button">
</div>
</form>
<div align="center">
<?php
if($_POST["youtubeurl"]!=""){
$pagecontent = file_get_contents($_POST["youtubeurl"]);
preg_match("/v=([^(\&|$)]*)/", $_POST["youtubeurl"],$matches);
$VideoID = $matches[1];
preg_match("/\"t\": \"([^(\\\"|$)]*)/", $pagecontent,$matches);
$T_ID = $matches[1];
$VideoURL = "http://youtube.com/get_video?video_id=$VideoID&t=$T_ID";
echo "<br /><a href=\" $VideoURL\" target=\"_blank\"><b>-> Свали клипчето <-</b></a>";
}
?>

</div>
</body>
</html>
 
иска curl но работи :)

Код:
<?php

if (!isset($_POST['submit']))
{
?>
<form method='post' action=''>
<input type='text' name='url' class='textbox'/>
<input type='submit' name='submit'value="Давай!" class="button">
</form>
<?php
}
// Youtube FLV Fetcher
// Responds to both HTTP GET and POST requests
// Author: Abdul Qabiz (abdul dot qabiz at gmail dot com)
//
// Description:Gets the path of FLV from YouTube URL
// Is it a POST or a GET?
if (isset($_POST['submit']))
{
$url = $_POST['url'];
$v = $url;
$v = preg_split ("/\?v=/", $v);
//youtube video-id

$v = $v[1];

//hardcoding URL here, couldn't figure how to make CURL follow 303 redirection
//seems something wrong with libCurl or my knowledge...

//$url = "http://www.youtube.com/watch?v=" . $v;


//Start the Curl session
$session = curl_init();
curl_setopt ($session, CURLOPT_URL, $url);
//you might want to turn it to false, in case you want
//to content to client (flash etc).
curl_setopt($session, CURLOPT_HEADER, true);
//not working for me :(
curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);
//curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
// Make the call
$response = curl_exec($session);
if (preg_match_all("/&t=[^&]*/", $response, $matches))
{
$t = $matches[0][0];
$t = preg_split("/=/", $t);
//youtube t param
$t = $t[1];
//construct the flv-url
$youtubeVideoPath = "http://www.youtube.com/get_video.php?video_id=" . $v . "&t=". $t . "";
//redirect to flv - you can replace this code with echo/print
//to return the path to client (browser/flash)
//header ("Location: $youtubeVideoPath");
echo "<a href=\"".$youtubeVideoPath."\">$youtubeVideoPath</a>";
}
else
{
echo "null";
}
curl_close($session);
}
else
{
echo "No YouTube URL to process";
}

?>
 

Back
Горе