tags:

views:

58

answers:

2

I want to write an app that parse particular threas on a phpbb forum. So if a thread has 200 pages with 10 posts (that doesn't give you the ability to adjust the post count per page), and has an address like this:

http://www.forum.com/viewtopic.php?t=10&postdays=0&postorder=asc&start=0

where start parameter changes when you navigate to the next pages of the same thread, how do you get the full thread in one go?

I tried:

http://www.forum.com/viewtopic.php?t=10&postdays=0&postorder=asc&start=0&end=2000

but didn't work.

Surely there must be a way to do this I imagine.

A: 

If you're parsing, just parse each page, then add up the results in the end. If the forum doesn't have an open API, or any way to display all of the posts on one page, this is what your are going to have to do. Perhaps you could write a recursive function that checks for a 'next page' link or something similar, follows it, then returns all of the data from the pages compiled.

EDIT: looking at example url you gave, have you tried changing the t variable? you said it was 10 posts per page, and that was set to 10, so maybe that's what controls posts per page.

http://www.forum.com/viewtopic.php?t=2000&postdays=0&postorder=asc&start=0
GSto
Thanks, so there is no way to retrieve the thread as a single page as a user?
Joan Venge
Not if what you have already tried didn't work.
Blair McMillan
Yeah it didn't work, but I thought maybe the end keyword was wrong, there was something else.
Joan Venge
A: 

Some super handsome fellow wrote a MOD for this if it is your forum: http://www.phpbb.com/community/viewtopic.php?f=69&t=1101295

Tyler Smith
Thanks, unfortunately it's not my forum.
Joan Venge