Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1024703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:49:02+00:00 2026-05-16T11:49:02+00:00

I’m attempting to turn a web interface into an Android one by parsing the

  • 0

I’m attempting to turn a web interface into an Android one by parsing the web page for relevant data and then allowing the user to send back data to the server. Using simple HttpClient code I have managed to get the web page and then parse the necessary information. I’m unfamiliar with sending data back, so, I’m hoping someone can shed some light. Here’s the relevant HTML code from the login page.

<table cellspacing=0 cellpadding=0><tr><td valign=top align=center>


<table cellspacing=0 cellpadding=0 border=0  width=220 align=center class=table_back><tr><td>
<table cellspacing=1 cellpadding=1 border=0 width=100%>
<tr class=table_row1><form action="i.cfm?&1028&p=login&se=4" method=post name=stepform><Td align=right nowrap>&nbsp;Empire Name&nbsp;</td><td>&nbsp;<input type=text name=nic size=16 ></td></tr>
<tr class=table_row2><Td align=right>Password&nbsp;</td><td>&nbsp;<input type=password name=password size=16 ></td></tr>

<tr class=table_row1><Td align=right valign=top>Server</td><td>&nbsp;<select name=server>


<option value="0" >Normal</option>

<option value="1" >Fast</option>

<option value="2" >Slow</option>

<option value="3" >Ultra</option>

<option value="4" selected>RT</option>


</select><font class=smallfont> <a href=javascript:ch('i.cfm?popup=help&type=server');>What is this <img src=i/help.gif></a>
</td></tr>
<tr class=table_row2><Td align=right>&nbsp;IP&nbsp;</td><td>&nbsp;69.47.105.149 <font class=smallfont>(United States of America)</font></td></tr>
<tr class=table_row1><td>&nbsp;</td><td>&nbsp;<input type=submit value="  Login  " ></td></tr>

</td></tr></table></table>

As you can see there are 3 inputs needed, the “Empire Name”, “Password”, and the “Server” which consist of 5 options. How would I go about sending this data back to the server over httpClient, assuming that I have gathered the relevant information form my Android GUI. Any help is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:49:02+00:00Added an answer on May 16, 2026 at 11:49 am

    The code may look like the following:

    private void postDataToServer() throws UnsupportedEncodingException, IOException {
    
        /* 
         * Taken from "action" field in the form. This can be absolute address
         * so take this into account.
         */
        String action = "i.cfm?&1028&p=login&se=4"; 
        /* This the server you want to send info. */
        String yourServer = "http://your.server.com/";
    
        /* This form uses "post" method. */
        HttpPost post = new HttpPost(yourServer + action);
        /* Form parameters. */
        List<NameValuePair> params = new ArrayList<NameValuePair>();
    
        /* This is what the user has entered in the corresponding fields. */
        String nic = getNic();
        String password = getPassword();
        String server = getServer();
    
        params.add(new BasicNameValuePair("nic", nic));
        params.add(new BasicNameValuePair("password", password));
        params.add(new BasicNameValuePair("server", server));
    
        UrlEncodedFormEntity entity = new UrlEncodedFormEntity(params, "UTF-8");
    
        HttpClient client = new DefaultHttpClient();
    
        post.setEntity(entity);
        client.execute(post);
    }
    

    Maybe this page also may help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.