Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MySQL database data submission

Posted on 2016-10-30
7
Medium Priority
?
91 Views
Last Modified: 2016-11-09
Hello Experts,

The question title seems confusing but no worries, it's a very simple question, I have a website with SSL to encrypt the data flowing over the web, I would like to add a functionality where a user submit his contact information and we get it in the database, in addition we want this data to be submitted to another server database as well. (sending the same data twice, first time to our original server and second time to our backup server)

We want to do that in securely manner to avoid any hacking while sending the information and the very important thing is, we want this to be transparent without exposing this while a user is digging into the source code or using other sniffing software.

Thank you
0
Comment
Question by:thebest8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 41865940
The usual design for something like this is to have an API on the backup server.  Your primary server will receive the user's contact information, and use a POST-method request over SSL to send the information to the API.  The API will enjoy the same protection that the original submission has.

Sometimes a check-digit or md5() string is used in these re-POST-requests to ensure that the data is intact after it is received by the API.
0
 

Author Comment

by:thebest8
ID: 41865941
Thanks Ray for your input, Ok, to be honest I have no idea about APIs, also there must be a script or just the code to be added to the original server to re-send the info back to the other server?
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 41865960
This expert suggested creating a Gigs project.
This might be worth putting the question into E-E Gigs.  It's not hard to do, but it's time-consuming to write and test the code, and it requires hands-on access to your servers and databases.

Here are some references that can help you understand the protocols and the general design pattern that most RESTful APIs follow.  At first it's a lot to take in, but once you understand the HTTP protocol, the other parts will come quickly.
https://www.experts-exchange.com/articles/11271/Understanding-Client-Server-Protocols-and-Web-Applications.html
https://www.experts-exchange.com/articles/12239/Introduction-to-Application-Programming-Interfaces.html
https://www.experts-exchange.com/articles/22519/Understanding-JSON-in-PHP-and-JavaScript-Applications.html
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:thebest8
ID: 41865966
Thanks alot I will go ahead and read the articles from the links you provided, by the way i'm planning to do tests on a localhost server like xampp ... you think there will be any limitation?
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 41865974
Yes, I think it might be confusing to test this on localhost.  Since the deployment servers will be in two different physical locations, and will have two different URL addresses, I would want to test the application over the internet, using the servers and URLs that you will eventually use for deployment.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41866118
I never use 'localhost' as an address for my web servers here.  I have 14 of them including XAMPP, WAMP, Apache, and IIS.  I use either the machine IP address or the machine hostname.  While 'localhost' can be used to connect to a database server that is on the same machine, most of the hosting companies I deal put the database servers on a separate machine so 'localhost' can't be used for that either.

The only purpose of 'localhost' is to restrict access to the server that the web server is on and prevent access from other computers.  Obviously (I think), there are no web sites on the internet that operate from 'localhost' because they would not be accessible by anyone else.

There are other problems with 'localhost'.  Chrome won't set cookies on 'localhost' because they do not consider it a 'unique' address.  'localhost' also bypasses the network functions so anything that depends on the way the network acts may work differently when you use 'localhost'.
1
 
LVL 79

Expert Comment

by:arnold
ID: 41866267
What is the relationship between the ain and backup server?
Is MySQL replication a consideration?

The issue often is that your data entry web interface might not have access to the backup server.
Another option as Ray pointed out in a way, is to have a process on the backup server that queries data from the main server adding, updating records as appropriate........
1

Featured Post

Interactive Way of Training for the AWS CSA Exam

An interactive way of learning that will help you visualize core concepts so that you can be more effective when taking your AWS certification exam.  Built for students by a student to help them understand the concepts that they are being taught.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
This video teaches users how to migrate an existing Wordpress website to a new domain.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question