-2

I am making an android app for http://yearbook08.com/ I know how to parse through a web page but I have no idea how to enter information in particular field or move onto another page.

If you open this link there are two text fields I want to enter data from my app and want to log in, if somebody has code for this it would be much helpful

Khurram W. Malik
  • 2,660
  • 2
  • 20
  • 27
  • 1
    Do you mind explaining your question further? – Andro Selva Jul 03 '12 at 07:21
  • How do you want to enter Rollno/password? Where it will let you after Login? Do you want to open next page in android app? – Paresh Mayani Jul 03 '12 at 07:23
  • Please be more specific while asking question. – Paresh Mayani Jul 03 '12 at 07:24
  • yes exactly i want to login to the home page – Khurram W. Malik Jul 03 '12 at 07:26
  • @khurram but what after login? – Paresh Mayani Jul 03 '12 at 07:40
  • Full marks to user's requirement => **if somebody has code for this it would be much helpful**, but my dear, Stackoverflopw is not code repository. Github will help you out in this case – Paresh Mayani Jul 03 '12 at 07:41
  • If I get successful to log in I will get to know how can I traverse through the whole website right ? Plus I asked for a basic code of HTTP request thing that should not harm someone :) – Khurram W. Malik Jul 03 '12 at 08:01
  • [link](http://stackoverflow.com/questions/3505930/make-an-http-request-with-android) In this link by the method suggested by Konstantin I was successfull to get a response from the website in the form of a string. The string had html of the login page, what am I supposed to do now ? how can I make a request to enter data in textfields and send a request to the server ? – Khurram W. Malik Jul 03 '12 at 08:07
  • You don't put actual data into the text fields. You just reconstruct the http request, which the form on the login page does. HTML forms do this usually via POST method. You need to "fake" this request. – Michael Schnerring Jul 03 '12 at 09:03
  • hey thanks man :) I did using name value pairs embeded to the request and it worked. Thanks :D – Khurram W. Malik Jul 03 '12 at 09:19

1 Answers1

1

If you want to enter user information without using the actual UI of the page, it will require some usage of http requests (shown here). As well you would need some kind of reverse engineering via reading the page's http headers, to know what the page responses in different navigational scenarios. To do this you'd need something like this.

Community
  • 1
  • 1
Michael Schnerring
  • 3,584
  • 4
  • 23
  • 53