im you tube video indirmek için phptube sınıfını kullanarak.
Kodda ben bir giriş kutusu üzerine youtube url yapıştırın ancak aşağıdaki hatalar var.
Warning: file_get_contents(http://www.youtube.com/get_video?video_id=&t=)
[function.file-get-contents]: failed to open stream: HTTP request failed!
HTTP/1.0 404 Not Found
ve
Warning: file_put_contents(./flvs/3Hx9VsqMUug.flv) [function.file-put-contents]:
failed to open stream: No such file or directory in E:\xampp\htdocs\vdo\utube
\functions.php on line 19
path:./flvs/3Hx9VsqMUug.flv
nerede sorun olduğunu söyle lütfen??
UPDATE:
Burada ana kodu
$url = "http://www.youtube.com/watch?v=".$video_id;
//where $video_id=nlZJ7RsyC0g
$this->req =& new HTTP_Request($url);
//echo "<pre>";
//print_r($this->req);
//echo "</pre>";
//die;
$response = $this->req->sendRequest();
//echo $response; die;
if (PEAR::isError($response)) {
//echo "inside if";
$response->getMessage()."\n";
} else {
//echo "inside else";
$page = $this->req->getResponseBody();
//print_r($page);
//var_dump($page);
//die;
preg_match("/video_id=(\w*)/",$page,$mv);
$v_id = $mv[1];
preg_match("/&t=([\w]*)&/",$page,$tickets);
$ticket = $tickets[1];
$curl = "";
$curl .= $v_id;
$curl .= "&t=";
$curl .= $ticket;
//echo $curl;
$url = "http://www.youtube.com/get_video?video_id=".$curl;
echo $url;
die;
if ($this->debug)
return $url;
output($url) is
http://www.youtube.com/get_video?video_id=nlZJ7RsyC0g&t=
Burada $t
null, nasıl youtube url $ticke
t alabilirim