Android Question post data to a webpage


Ok i see thanks.
The thing i need first to send username andxa password to a php page then get access to the next page.
How is best to do that.
Im still in learning process so not fully sure if it is post/get or download with okhttputils2 or use webview there also.

But i also gonna look at the post multipart to


Active Member
Licensed User
I want to post a data to a webpage like this.
So a post get command for post a page would be nice.
you can do that if the server accepts something like this:
or do you normally have to fill out a form with input boxes for username/password and click on a "send" button?

some servers accept both ways. if the first is acceptable, then you don't need to post anything. just do like above. otherwise you need to use okhttputils poststring method.

in either case, however, you need to know exactly how the username and password fields are called (eg, "username", "userid", "userID", "ID"). what is the server expecting those fields to be called? in order to know what the fields are called, you need to look at the webpage's source.

do not forget to take note of any "hidden" fields. they must be included in the request. if you're unfamiliar with webpage forms, you need to look into them.

if a form is involved, okhttputils2 has a poststring method to which you would pass the relevant data, eg,

you then download the server's response as you always do. what you do with that response is unclear since you didn't get into that.


Ok thanks for the input. Im gonna check alittle more.
See what i find out. Webpage dource. I have that here so easy to check.
More input are welcome.


Licensed User
Search for php. Here you'll find my examples how to post data to a php script (tutorials)


Well-Known Member
Licensed User
4 post methods of the HTTPJob:

pars = "bla=infofromapp&bla2=info2fromapp"   'URL-encoded parameters line
j.PostString("", pars)
The main task is to create a server script (your page.php) that will receive these POST fields and thire values.
Last edited:


Well-Known Member
Licensed User
You will find the sample code in 1st post

It is now easier (and highly recommended) to use okHttpUtils2