Moglby ktos podpowiedziec jak zrobic skrypt pobierania pliku przez wyslanie naglowka header z mozliwoscia wznowienia pobrania pliku?
Plik czytam readfile().
<?php ?>
$url="http://www.www.pl/plik.rar";
<? $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://www.strona.pl/plik.rar"); curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); curl_exec($ch); curl_close($ch); ?>
<? $file = "sa.rar"; $fileName= "sa.rar"; $offset = 0; $length = $filesize; // if the HTTP_RANGE header is set we're dealing with partial content $partialContent = true; // find the requested range // this might be too simplistic, apparently the client can request // multiple ranges, which can become pretty complex, so ignore it for now } else { $partialContent = false; } // seek to the requested offset, this is 0 if it's not a partial content request if ( $partialContent ) { // output the right headers for partial content } // output the regular HTTP headers // don't forget to send the data too
$file="plik.rar"; $filename = "plik.rar"; $size="4555455";// waga w byte { } else { } { $size2=$size-1; $new_length=$size2-$range; } else { $size2=$size-1; } { }