abhicool1
January 17th, 2010, 05:56 AM
I am having a problem to read file from remote url.
at this stage I have successfully grabbed a video from YouTube and link which is generated is.
$link =
// output http://v14.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorit hm%2Cburst%2Cfactor&fexp=901421%2C900033%2C903105&algor... (http://www.webmasterworld.com/redirect.cgi?f=88&d=4062281&url=http://v14.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorit hm%2Cburst%2Cfactor&fexp=901421%2C900033%2C903105&algor...)
which offers a file to download video.flv
now my problem is i want to save this file to localhost.
I have tried using
$file1 = file("$link?$QUERY_STRING");
$file1 = @implode("", $file1);
// echo "$file1";
echo "$file1"; gives raw data of file
FLV ��� ���� � 8.....
Now, I want to save it on my local drive so that i can convert it by using FFMPEG
I have tried..
$fh = fopen("testvideo.flv", "w");
fwrite($fh, $file1);
fclose($fh);
but unable to write data into file. File remains blank after execuation of code.
Please help me.
at this stage I have successfully grabbed a video from YouTube and link which is generated is.
$link =
// output http://v14.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorit hm%2Cburst%2Cfactor&fexp=901421%2C900033%2C903105&algor... (http://www.webmasterworld.com/redirect.cgi?f=88&d=4062281&url=http://v14.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorit hm%2Cburst%2Cfactor&fexp=901421%2C900033%2C903105&algor...)
which offers a file to download video.flv
now my problem is i want to save this file to localhost.
I have tried using
$file1 = file("$link?$QUERY_STRING");
$file1 = @implode("", $file1);
// echo "$file1";
echo "$file1"; gives raw data of file
FLV ��� ���� � 8.....
Now, I want to save it on my local drive so that i can convert it by using FFMPEG
I have tried..
$fh = fopen("testvideo.flv", "w");
fwrite($fh, $file1);
fclose($fh);
but unable to write data into file. File remains blank after execuation of code.
Please help me.