C# safe connect to MySQL database. Download and upload data via PHP script.
Greets! I try to create World Score System. So i made MySql database on free hosting service. Then i found a way how to connect my C# code to MySql. Unfortunately in C# Script i must write my password and nickname so it is easly to discover that and take over my Database (If anyone know how to Hide that password please explain me how to do it). And then i came up with a new idea. I create webpage, and put there .php script. That script is should connect to database, and receive data. Then C# script by using WWW object download all txt, and then split in on parts. That part works great! But i have no idea how Send data (Nickname and score) From C# script to PHP, and then to MySQL database. Any ideas how can i make this? Game is for android platform. Oh, and sorry for my poor english.
Answer by ElementalVenom · Aug 09, 2016 at 08:31 PM
The best way to do this is make a TCP server(In any language you want, c# will work) and have your game connect to that server. Have it tell the server what to put into the database or what to take out and the server will do it for you. That way you're not saving the username and password directly into the assemblies of the game.
Your answer
Follow this Question
Related Questions
Can I add a table to a mySQL database using C#? 0 Answers
Why is MySQL search query not returning each row in 1 index of an array? 0 Answers
WWW not working on my PHPs 0 Answers
Insert and Retrieve image from Database in Unity3d 0 Answers
C# Project in Unity (web game) crossed with PHP and MySQL 0 Answers