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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:59:40+00:00 2026-06-03T19:59:40+00:00

I’m developping an Android app which uses the same MySQL server as a website

  • 0

I’m developping an Android app which uses the same MySQL server as a website is using.

I want to connect to the database in my app, and I’ve done that before by placing some PHP files on the server and use a HTTP post and retrieve the response in json format. I don’t know why – I’m not a specialist – but this just doesn’t look like a very safe way to me.

Using a SOAP or REST webservice looks safer to me, but I don’t know how to deploy those on a server (the server is not mine, I don’t want to fool around too much with it).

So what is the safest way for me then?

And if I’m using PHP scripts, should I store the database credentials in the PHP scripts or in my application and pass them to the PHP script? What’s the safest of these?

Thanks

  • 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-03T19:59:42+00:00Added an answer on June 3, 2026 at 7:59 pm

    Your choice of “envelope-technology” has no effect on security. In security architecture terms, plain php pages, REST-like architectures and SOAP services are all identical – you are still sending and receiving the exact identical information over the same channel. It is just wrapped up in a different way. No additional protection is given.

    As for your credentials, it is best to store them in a file that lives outside of the web server’s documentroot – this limits your exposure if a seperate vulnerability allows your website files to be enumerated or read. Your PHP program can require_once the credentials file.

    If users can have information stored that is specific to them, you will need to use authentication and authorisation to ensure that one use cannot act on another user’s behalf.

    Oh, and don’t allow GET requests to change your data. Require that all state-changing or destructive actions can only be performed with POST requests. This will limit the risk of damage to you data from user-agents/proxies that pre-cache requests, or replay requests and from users/search-robots browsing around your site.

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

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
We're building an app, our first using Rails 3, and we're having to build
I am using Paperclip to handle profile photo uploads in my app. They upload
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into

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.