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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:12:06+00:00 2026-05-26T22:12:06+00:00

I’ve a MySql database hosted in my web site, with a table named UsrLic

  • 0

I’ve a MySql database hosted in my web site, with a table named UsrLic
Where any one wants to buy my software must register and enter his/her Generated Machine Key (+ username, email …etc).

So my question is:

I want to automate this process from my software, how this Process will be?
Should I connect and update my database directly from my software ( and this means I must save all my database connection parameters in it * my database username , password , server * and then use ADO or MyDac to connect to this database ? and if yes how secure is this process ?

or any other suggestions .

  • 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-26T22:12:07+00:00Added an answer on May 26, 2026 at 10:12 pm

    I recommend creating an API on your web site in PHP and calling the API from Delphi.

    That way, the database is only available to your web server and not to the client application, ever. In fact, you should run your database on localhost or with a private IP so that only machines on the same physical network can reach it.

    I have implemented this and am implementing it again as we speak.

    PHP

    Create a new file named register_config.php. In this file, setup your MySQL connection information.

    Create a file named register.php. In this file, put your registration functions. From this file, include ‘register_config.php’. You will pass parameters to the functions you create here, and they will do the reading and writing to your database.

    Create a file named register_api.php. From this file, include ‘register.php’. Here, you will process POST or GET variables that are sent from your client application, call functions in register.php, and return results back to the client, all via HTTP.

    You will have to research connecting to and querying a MySQL database. The W3Schools tutorials will have you doing this very quickly.

    For example:

    Your Delphi program calls https://mysite/register_api.php with Post() and sends the following values:

    name=Marcus
    email=marcus@gmail.com
    

    Here’s how the beginning of register_api.php might look:

    // Our actual database and registration functions are in this library
    include 'register.php';
    
    // These are the name value pairs sent via POST from the client
    $name = $_POST['name'];
    $email = $_POST['email'];
    
    // Sanitize and validate the input here...
    
    // Register them in the DB by calling my function in register.php
    if registerBuyer($name, $email) {
      // Let them know we succeeded
      echo "OK";
    } else {
      // Let them know we failed
      echo "ERROR";
    }
    

    Delphi

    Use Indy’s TIdHTTP component and its Post() or Get() method to post data to register_api.php on the website.

    You will get the response back in text from your API.

    Keep it simple.

    Security

    All validation should be done on the server (API). The server must be the gatekeeper.

    Sanitize all input to the API from the user (the client) before you call any functions, especially queries.

    If you are using shared web hosting, make sure that register.php and register_config.php are not world readable.

    If you are passing sensitive information, and it sounds like you are, you should call the registration API function from Delphi over HTTPS. HTTPS provides end to end protection so that nobody can sniff the data being sent off the wire.

    Simply hookup a TIdSSLIOHandlerSocketOpenSSL component to your TIdHTTP component, and you’re good to go, minus any certificate verification.

    Use the SSL component’s OnVerifyPeer event to write your own certificate verification method. This is important. If you don’t verify the server side certificate, other sites can impersonate you with DNS poisoning and collect the data from your users instead of you. Though this is important, don’t let this hold you up since it requires a bit more understanding. Add this in a future version.

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

Sidebar

Related Questions

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 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
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a reasonable size flat file database of text documents mostly saved in
I'm making a simple page using Google Maps API 3. My first. One marker
I have just tried to save a simple *.rtf file with some websites and

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.