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 6704371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:16:51+00:00 2026-05-26T07:16:51+00:00

I would like to fetch data from a phpMyAdmin server. The only function I

  • 0

I would like to fetch data from a phpMyAdmin server. The only function I know, is this :

private String getPage() {
            String str = "***";

            try
            {
                HttpClient hc = new DefaultHttpClient();
                HttpPost post = new HttpPost("http://mywebsite.me");
                HttpResponse rp = hc.execute(post);

                if(rp.getStatusLine().getStatusCode() == HttpStatus.SC_OK)
                {
                    str = EntityUtils.toString(rp.getEntity());
                }
            }catch(IOException e){
                e.printStackTrace();
            }  

            return str;
        }

It doesn’t work because I need to authenticate myself with an username and password. Another reason that I think this function will not work is that it grabs the source of the page (ctrl+u in Chrome) and the values that I need aren’t there, they are in a table on the server. How could I do that?

  • 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-26T07:16:52+00:00Added an answer on May 26, 2026 at 7:16 am

    You’re going about it the wrong way I think. I presume that phpAdmin is actually phpmyadmin, and you are looking for data from your database?

    PHPMyAdmin is a selection of pages that does what you want to do for a browser: extract information from a database. You don’t need to go trough that page to get the info. You can either write some .php files that extract the data for you (for instance in XML or JSON) and fetch them with above code, or try to contact you database directly, without intervention of the apache server.

    Edit: it looks like contacting directly isn’t too easy, and you’r login should be valid for external connects (which it might not be). I guess you should write a so-called “REST” interface (a bunch of files that does basically what phpmyadmin does, but not as complicated: you request a table and it gives you this without all the other stuff phpmyadmin shows).

    look for instance here for more information on how to do that: http://www.helloandroid.com/tutorials/connecting-mysql-database

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

Sidebar

Related Questions

My Flash movie would like communicate with MySQL server to fetch and save data
I would like to know if we can select data from the database using
I would like to fetch data from the phone, sms and mail app on
I am using NSURLConnection to fetch XML data from the server. I am parsing
I would like to be able to get html-formatted data from mysql, and turn
Fortunately, I know how to fetch data from the database, That's not a problem.
I would like to be able to fetch a web page's html and save
Would like to know what a programmer should know to become a good at
Would like to know the c# code to actually retrieve the IP type: Static
I would like to test a string containing a path to a file for

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.