shage Posted April 24, 2009 Share Posted April 24, 2009 Maybe its me, im trying to grab a flv from another site using curl since the tutorial is in a series but it seems to only grab half the file, ive tried different parts of the series but again just half the flv $fp = fopen ('part1.flv', 'w+');//This is the file where we save the information $ch = curl_init($download_link);//Here is the file we are downloading curl_setopt($ch, CURLOPT_TIMEOUT, 50); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_exec($ch); curl_close($ch); fclose($fp); is the code im using thank you Quote Link to comment https://forums.phpfreaks.com/topic/155514-curl/ Share on other sites More sharing options...
shlumph Posted April 24, 2009 Share Posted April 24, 2009 Did you set a long max execution limit? Quote Link to comment https://forums.phpfreaks.com/topic/155514-curl/#findComment-818324 Share on other sites More sharing options...
shage Posted April 24, 2009 Author Share Posted April 24, 2009 lol if thats it im going to kick myself in the you know what one second lol Quote Link to comment https://forums.phpfreaks.com/topic/155514-curl/#findComment-818329 Share on other sites More sharing options...
premiso Posted April 24, 2009 Share Posted April 24, 2009 As a side note, depending on how big the flv is, you may want to increase the memory_limit temporarily too to be at least the size of the flv since you have to store it into memory before you write it to the file. Quote Link to comment https://forums.phpfreaks.com/topic/155514-curl/#findComment-818332 Share on other sites More sharing options...
shage Posted April 24, 2009 Author Share Posted April 24, 2009 ahhh yet set time limit didnt work still got half of the file, file size is 10mb Quote Link to comment https://forums.phpfreaks.com/topic/155514-curl/#findComment-818370 Share on other sites More sharing options...
shage Posted April 24, 2009 Author Share Posted April 24, 2009 max_execution_time 300 300 max_input_nesting_level 64 64 max_input_time 60 60 memory_limit 128M 128M open_basedir no value no value output_buffering no value no value output_handler no value no value post_max_size 8M 8M precision 12 12 is what server says everything is set to Quote Link to comment https://forums.phpfreaks.com/topic/155514-curl/#findComment-818384 Share on other sites More sharing options...
shage Posted April 24, 2009 Author Share Posted April 24, 2009 heres a random file that is pretty much how the members area is set up with the videos, it redirects to a flv but here is one i tried this one also and only get half of the flv http://v1.lscache4.googlevideo.com/videoplayback?id=853267c50ad2c716&itag=5&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag&ip=174.137.163.84&signature=068635809D4151C609853A2786EE73068A10E133.4D49D4245EF03FE4CBDC374F6ACBCF8E47993F47&sver=3&expire=1240616043&key=yt1&ipbits=0 Quote Link to comment https://forums.phpfreaks.com/topic/155514-curl/#findComment-818434 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.