siddscool19 Posted October 8, 2008 Share Posted October 8, 2008 What does that error means? I have downloaded the file to my server from another server using curlopt_FILE and its showing correct size... Few files work (rarely) but most of the time when i try to access file it gives error 404.jsp and takes me to home page ??? Quote Link to comment https://forums.phpfreaks.com/topic/127575-file-downloaded-to-server-but-error-404jsp/ Share on other sites More sharing options...
php.ajax.coder Posted October 8, 2008 Share Posted October 8, 2008 Try looking at this post http://www.phpfreaks.com/forums/index.php/topic,95433.0.html Quote Link to comment https://forums.phpfreaks.com/topic/127575-file-downloaded-to-server-but-error-404jsp/#findComment-660065 Share on other sites More sharing options...
siddscool19 Posted October 8, 2008 Author Share Posted October 8, 2008 can u tell me how to use it please? This is the coding which I am using to download file.... <?php /* This is usefull when you are downloading big files, as it will prevent time out of the script : */ set_time_limit(0); ini_set('display_errors',true);//Just in case we get some errors, let us know.... $filename=$_POST["filename"]; $file=$_POST["file"]; $fp = fopen (dirname(__FILE__) . '/'.$filename.'', 'w+');//This is the file where we save the information $ch = curl_init($file);//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); ?> Quote Link to comment https://forums.phpfreaks.com/topic/127575-file-downloaded-to-server-but-error-404jsp/#findComment-660088 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.