your offset be, for example, 20 postings.
your starting point be 0.
on top of your script, read in the postings file using the file() function:
$postings = file("postings.txt");
now the file is in an array, 1 line = 1 posting.
at the first time (link from menu, ...) call the script with the parameters:
?start=0&offset=20
in the script, generate the posting list using:
for($i=$start; $i<$start+$offset; $i++)
{
// output of 1 posting
$parts = explode("@~%", trim($postings[$i]));
echo "Title: ".$parts[0]."<br><br>Posting: ".$parts[1]."<br><br>";
}
now place prev/next links:
<a href=thisscript.php?start=<?=($start-$offset) ?>&offset=<?=$offset ?>>previous <?=$offset ?></a>
<a href=thisscript.php?start=<?=($start+$offset) ?>&offset=<?=$offset ?>>next <?=$offset ?></a>
I hope you get the point ...