nie wiem czy wyrażam się poprawnie, ale trudno... chodzi mi o to czy jest możliwy streaming pobieranego pliku? Chodzi o to, że pobieram jakiś plik z serwera i w tym pośredniczy inny serwer (chodzi o to, że plik nie jest na niego bezpośrednio zapisywany, a tylko pośredniczy w połączeniu)? Znalazłem na php.net funkcję i zaciekawiła minie... bo wydaje mi się, że tak działa, proszę o zerknięcie na to i odpowiedź:
<?php function dl_file_resumable($file, $is_resume=TRUE) { //First, see if the file exists { } //Gather relevent info about file //workaround for IE filename bug with multiple periods / multiple dots in filename //that adds square brackets to filename - eg. setup.abc.exe becomes setup[1].abc.exe $fileinfo['basename']; //This will set the Content-Type to the appropriate setting for the file switch($file_extension) { case 'exe': $ctype='application/octet-stream'; break; case 'zip': $ctype='application/zip'; break; case 'mp3': $ctype='audio/mpeg'; break; case 'mpg': $ctype='video/mpeg'; break; case 'avi': $ctype='video/x-msvideo'; break; default: $ctype='application/force-download'; } //check if http_range is sent by browser (or download manager) { if ($size_unit == 'bytes') { //multiple ranges could be specified at the same time, but for simplicity only serve the first range //http://tools.ietf.org/id/draft-ietf-http-range-retrieval-00.txt } else { $range = ''; } } else { $range = ''; } //figure out download piece from range (if set) //set start and end based on range (if set), else set defaults //also check for invalid ranges. //add headers if resumable if ($is_resume) { //Only send partial content header if downloading a piece of the file (IE workaround) if ($seek_start > 0 || $seek_end < ($size - 1)) { } } //headers for IE Bugs (is this necessary?) //header("Cache-Control: cache, must-revalidate"); //header("Pragma: public"); //open the file //seek to start of missing part //start buffered download { //reset time limit for big files } exit; } ?>
Dodatkowo czy jest możliwość zrobienia czegoś takiego w curl?