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

  • SEARCH
  • Home
  • 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 7707263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:18:57+00:00 2026-06-01T00:18:57+00:00

I am try to use an external website to get data but what I

  • 0

I am try to use an external website to get data but what I seem to be getting is the whole Html source code for the website. Infact it does not process the parameters i pass to it.
The website is http://www.siirretytnumerot.fi/ and if I add the QueryServerlet to the end of the link I just get a short structure of the source code for the link without any result. I have also tried using both HttpPost and Get still same out. Please can someone kindly tell me is the problem is that the website cannot be used for resources purpose?
Please I would take any advice or suggestions.
The code I am using is this. And note I have a try and catch clause surround this code.

HttpClient client = new DefaultHttpClient(); 

        String postURL = "http://www.siirretytnumerot.fi/";//if I add QueryServlet to the end it just gives a response with the html structure
       BufferedReader in=null;
       String data=null;
        HttpPost post = new HttpPost(postURL); 


            List<NameValuePair> params = new ArrayList<NameValuePair>();

            params.add(new BasicNameValuePair("PREFIX", "044"));
            params.add(new BasicNameValuePair("NUMBER", "9782231"));
           params.add(new BasicNameValuePair("LANGUAGE", "English"));
          params.add(new BasicNameValuePair("Submit", "Search"));

            UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params,HTTP.UTF_8);

            post.setEntity(ent);
            HttpResponse responsePOST = client.execute(post);


            in=new BufferedReader(new InputStreamReader(responsePOST.getEntity().getContent()));    
            StringBuffer sb=new StringBuffer("");
            String l="";
            String nl=System.getProperty("line.separator");
            while((l=in.readLine())!=null){
                sb.append(l+nl);
            }
            in.close();
            data=sb.toString();
            list.add(data);
            datalist=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,list);
            ml.setAdapter(datalist);

This is output I get from response

<img src="QueryServlet?ID=457016727131196340&amp;STRING=QIHfqzk16uj6adStbdzyaqMjYwaokhP1Zq1Tlz%2BjL4YQ7tRne4RdxwCcvcJKiZWvvsTXcpqHxcDplE9LVExKGg==" />
  • 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-06-01T00:18:58+00:00Added an answer on June 1, 2026 at 12:18 am

    Try like this:

    String postURL = "http://www.siirretytnumerot.fi/QueryServerlet";
    ...
    params.add(new BasicNameValuePair("Submit2", "Clear"));
    ...
    UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to use doctest from example from http://docs.python.org/library/doctest.html But when I run python
I try to use GAE for a cron job. But I get a server
I use External JavaScripts in a website as I always try to keep JavaScript
I try use string as a regular expression pattern but I've following errors PHP
I try use a integer array in java with the code below: public static
I try to use the following code: ArrayList<String> Map<String, String> Eclipse complains about both
I have an installation of Git for Windows, but when I try to use
I am trying to use an external mysql database in my java application, but
I try to use javaPns to send push notifications to my device, but I
How can I use an external data file in my Visual Studio unit tests?

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.