- Home /
unity3d connect to php or coldfusion for database information
I want to be able to pull data from a database and assign that data to variables via unity3D. I would like to do this using AJAX or a similar system to get real time updates on the data, either retrieving the data or updating the database. I'd prefer to do so via functions in either a PHP file or Coldfusion file running on a public server. I'm not looking for simple high scores posting page or anything like that. Does anyone have some links or advice to get started?
Answer by aLucidWorld · May 29, 2010 at 06:08 AM
I ended up using smartFox server to update the same database that the Coldfusion server is using for data calls.. seems to be the only way to achieve the result I wanted.
Answer by Lucas Meijer 1 · May 23, 2010 at 09:58 PM
You can use the WWW class in Unity to make HTTP post requests to any webserver of your liking. You have a wide variety of options available on the server to accept and deal with that request. (php, .net, python, perl, etc)
But I can't send data back to the unity client with a post or get method can I? I mean, to a point, but not a several hundred row query.. the GET response would be ridiculously long. Can you connect to components, like you would with ajax? Do you have any links to get me started?
Your answer
![](https://koobas.hobune.stream/wayback/20220613020052im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Web Player and database 1 Answer
Android Mysql Database online 3 Answers
Unity to PHP/MySQL: password and username security 1 Answer
Saving a leaderboard using PHP and C#. 2 Answers
Using PHP to generate objects or list in Unity with C# 2 Answers