how does server communication work in a flash game with a php backend

Posted by Tim Rogers on Game Development See other posts from Game Development or by Tim Rogers
Published on 2012-07-10T18:13:20Z Indexed on 2012/07/10 21:25 UTC
Read the original article Hit count: 302

Filed under:
|
|

I am trying to create a browser game using actionscript/flash. Currently, I'm trying to understand how I would go about creating a back-end which interfaced with my MySQL database.

As far as I understand, If I create a php file on a webserver called test.php and then navigate to a webpage hosted on the server eg. www.example.com/test, the php script will run and display the result in my browser.

This would use http. Is this how communication between client and server usually works in a flash game? for example, if the game needed to query the db. Would actionscript have to essentially invoke the url of the php script that would execute the query? it could then parse the data and use it.

If this is the case, then is JSON considered a good way to transfer data over http?

© Game Development or respective owner

Related posts about server

Related posts about php