Building a Flash->PHP->mySQL data passing system

plasmafish

New member
I'm looking at building a simple PHP/mySQL data passing system integrated through Flash. I have tried armorbots score system and it worked perfectly for what I needed it for but their service is inconsistent and I am at the point in my web skills where I'm picking up the PHP/mySQL books.

So I am looking at writing my own PHP applet that receives data from a SWF and sends it to a mySQL database. I am looking at writing the Flash portion in Actionscript 2.0 and 3.0, the PHP in PHPv4, and the SQL in v5. The data passing will have a check portion on the PHP applet that will validate the data before being accepted into the database and the Flash portion will not have any validation. The SWF will not have verification of the variables being passed, it will just send them to the appropriate applet if connected to the internet. The data will be numbers and letters only but support for other characters would be a cool thing to be able to implement in the future. Right now I'm only looking at passing 2 variables like a name and a score, or a name and phone number, I'm going to keep it simple to start.

Even though creating databases is a breeze for me and writing actionscript is a breeze I have never tried to pass the actionscript variables to a PHP applet. I assume once I get into these books this stuff will seem like a breeze but I will have to look further into passing variables to external files in flash in order to accomplish this.

How hard does all of this sound and is there any quick way to send the variables to the PHP applet from the SWF?
 
Have you tried http://code.google.com/p/assql/?

asSQL is an Actionscript 3 Mysql Driver aimed towards AIR projects to allow Mysql database connectivity directly from Actionscript.

I haven't used AIR yet but I'm getting into it. I would use this for my flash file right now but it stores the database username and password in the SWF and that is very insecure to me.

The below comment I read on the google assql discussion was aimed at using this for Flex projects and not AIR projects. My project is neither Flex or AIR right now, it is just a standard SWF.
"Storing your MySQL username and password anywhere that's web accessible is downright dangerous and wrong. Anyone can decrypt a SWF with enough determination, and then your database is owned by the world wide web. Even if you set your database account to be read-only, damage can still be done, and why would you want someone reading your database at their own whim?"


Thanks for the link, I got a lot of insight on the subject.
 
Back
Top