Crawl particular phpbb sub-forum, grab last image from each topic?

Hi. I don’t know much about php so apologies if this is in the wrong forum. What I want to do is have a page where it grabs the last image from all topics within a particular sub-forum then displays them. I’ve tried searching google but am struggling to find anything related to this.

Any help appreciated.

I am not sure that I follow you. You need last image in the thread of the specific sub forum?

Yes I want the script to grab the last three images from every thread from a sub-forum (selectable by page number).

If you look at this page:

That script grabs all the pics from a specific thread. I want my script to display a gallery like that but the pictures are pulled from multiple threads as described above instead.