Downloading file from another website in PHP creates the file but doesn't download any bytes -


i'm trying download this file dropbox, tried same code file on same website running php script , did work when add full ulr, doesn't.

the problem qr-kodite.rar file created in windows downloads folder size 0 , chrome says download has finished.

this code :

if(isset($_get['app'])){     if(basename($_get['app']) == $_get['app']){         $path = 'https://dl.dropboxusercontent.com/s/pdg8bnpmbgvcsmd/qr-kodite.rar';          $size = filesize($path);         header('content-type: application/octet-stream');         header('content-length: ' . $size);         header('content-disposition: attachment; filename=' . $path);         header('content-transfer-encoding: binary');         header('expires: 0');         header('cache-control: must-revalidate');         header('pragma: public');         ob_clean();           $file = @ fopen($path, 'rb');         if($file){             fpassthru($file);             $_session["ita"] = "no";             exit();         }     } } 


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -