<?php class Sender { /*** * This function takes a path to a file to output ($file), the filename that * the browser will see ($name) and the MIME type of the file ($mimeType, optional). * * If you want to do something on download abort/finish, * register_shutdown_function('function_name'); */ { // Figure out the MIME type (if not specified)... "pdf" => "application/pdf", "txt" => "text/plain", "html" => "text/html", "htm" => "text/html", "exe" => "application/octet-stream", "zip" => "application/zip", "doc" => "application/msword", "xls" => "application/vnd.ms-excel", "ppt" => "application/vnd.ms-powerpoint", "gif" => "image/gif", "png" => "image/png", "jpeg" => "image/jpg", "jpg" => "image/jpg", "php" => "text/plain" ); if ($mimeType == '') { $mimeType = $known_mime_types[$file_extension]; } else { $mimeType = "application/force-download"; }; }; // required for IE, otherwise Content-Disposition may be ignored... // The three lines below basically make the download non-cacheable... //header("Cache-control: private"); //header('Pragma: private'); //header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // multipart-download and download resuming support if (!$range_end) { $range_end=$size-1; } else { } $new_length = $range_end-$range+1; } else { $new_length = $size; } /* output the file itself */ $chunksize = 1 * (1024 * 1024); //you may want to change this $bytes_send = 0; } } else { } //end PHP script... } } ?>
przykładowe linki
http://62.75.147.61/bar_application/Reques...php?storageId=2
http://62.75.147.61/bar_application/Reques...php?storageId=6