Hello I work on a 3D application that requires, among other things, user accounts. Accounts that bring together various data recovery on a database. So I’ll use PHP / MySQL.
I thought of two ways and I would like to know which is the most viable (I’d also like some tips)
Talk with php files from Unity. Php that will handle all the data side (name, email, image library) (but the coup, how to chat from Unity with external php file)
Work on two “layers” different => Carry the one hand all the listed 3D application and then make a second layer html / php. (providing in advance the place occupied by areas of images and data, and capture mail to contact me or other)
In short I would have a lot of different and varied data to process and display the application. If you have a more interesting with these two I’m interested:)
If I understand you correctly, for one, you can do a Search here for PHP and get all kinds of tips. Basically, use WWW object. Just put params in the url eg: http://yourserver.com/yourscript.php?param1=hello¶m2=world (or you can use a WWWForm and PHP will use POST instead of GET vars). Send back data however you want to process it. XML is popular but generally more overhead that you might need.
I looked a little “www” and other little things but the “problem” is that the application we are making is displayed in a web page but this page will never be re-loaded. So, unable to send the parameters via the URL.
We think of using AJAX but I admit that would have need of explanation or the beginning of a reflection on “how to do”.
We seek, initially, to make a system user account …
X10 Hosting allows free hosting of PHP, and also uses MySQL for database storage. It’s fairly fast, I’ve used it before. There are a couple of youtube videos out there on how to make user accounts.
Long story short, use a Unity WWWForm Object (Read more on that Here). You can attach whatever data you want to, and send it to the php file on X10. Your php file can take the data, process it, store whatever it needs to with sql, and send back some reply data. I’m currently working on using this to create online level sharing; send data from the level editor to the php to remember, other users can see all the levels on the server and pick one to play, or make their own.