views:

178

answers:

1

I would be grateful if someone could please show me an example of how to login to a phpBB forum remotely and perform a search. The language i am using is java however, i just need to know the steps involved. even some pointers on what to google to get the answers i need would be great i have googled everything i can think of.

+1  A: 

I'm unable to give you code samples for this, but the general process would be

Use a POST request to send the login details to {forumLocation}/ucp?mode=login, this requires the inputs "username" and "password"

Once your are logged in using this method you should just be able to perform searches by sending requests to this url

/search.php?keywords={value1}+{value2}+{value3}&terms=all&submit=Search

Where value1, value2, value3 are your search items.

There is a Java libary which should be able to help you with this called HTTPCLient, which should make maintaining the session once your logged in easy.

This page will give you some more details of sending post inputs HTML forms.

Hope this at least puts you on the right track.

Kingamajick
denis
No, to send that POST requested you would have to use UrlEncodedFormEntity with the HttpPost Object. There is an example of this in the HTML from link in my reply to your original question. I've not actually done this myself, but it looks pretty straight forward
Kingamajick