in reply to last 10 ... next 10?

Sure is it possible. Just give a pointer to the next set to your script.
The script has to provide the links for last/next, which will contain the pointer, which again is processed by your script.