Problem sam rozwiązałem.
Oto test:
Kod
<?php
$f = fopen('file.txt', 'r');
$data = fgets($f, 1024);
fseek($f, 2024);
$pos = ftell($f);
echo $pos;
fclose($f);
?>
$f = fopen('file.txt', 'r');
$data = fgets($f, 1024);
fseek($f, 2024);
$pos = ftell($f);
echo $pos;
fclose($f);
?>
@edit
Mam błąd :/
Cytat
Warning: fseek() [function.fseek]: stream does not support seeking in C:\Program Files\WebServ20\httpd-users\downmanager\test.php on line 27
A oto kod:
<?php if($_GET['restart']) $_OPEN = $_SESSION['files']; // na skróty // inicjacja $plik = 'plik.txt'; $path = 'http://localhost/pobierz.txt'; $headers = get_headers($path); { $i++; $length = $length[1]; break;} } // koniec inicjacji { } else { $contents .= $data; // dodaj informację o pozycji pliku $_SESSION['files'][$plik]['where'] = $pos; } ?>