Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411670 Posts in 69397 Topics- by 58452 Members - Latest Member: homina

May 16, 2024, 03:13:47 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)PHP + Flash
Pages: [1]
Print
Author Topic: PHP + Flash  (Read 1663 times)
agj
Level 10
*****



View Profile WWW
« on: February 05, 2010, 11:40:10 AM »

My knowledge of PHP and MySQL is very limited, but I will need to use them and make them interface with Flash, somehow. What I have planned is a Flash game that records images and certain other game session data and sends them over to the website, which stores them on the user's account and displays them like a gallery for every user, which can then be sorted according to different parameters.

My question is: How difficult would it be for me to create such a backend using PHP and MySQL myself, considering that I have never programmed anything very complex in PHP? I am most familiar with actionscript 3. I don't think that it'll be impossible for me to do it, but I'm just wondering if all the security concerns might make it unfeasible for a newbie to make a somewhat complicated backend like this without leaving several holes open. Maybe it would be better to find someone to help me with that side of the project?
Logged

kiwi
Level 0
***


View Profile WWW
« Reply #1 on: February 05, 2010, 12:21:43 PM »

My question is: How difficult would it be for me to create such a backend using PHP and MySQL myself, considering that I have never programmed anything very complex in PHP?

The PHP/MySQL backend takes somewhere round 15-20 minutes to code, designing the whole system and the database structure might take some more time though.
Use MySqli to bind parameters to queries, that way the data never touches the query, making it impossible for an attacker to succeed with an SQL Injection

Short tutorial on prepared statements
Logged

agj
Level 10
*****



View Profile WWW
« Reply #2 on: February 05, 2010, 12:43:40 PM »

Thanks, that seems really useful. But will it really cover all the bases, security-wise?
Logged

bateleur
Level 10
*****



View Profile
« Reply #3 on: February 06, 2010, 07:21:44 AM »

Thanks, that seems really useful. But will it really cover all the bases, security-wise?

It's good enough, yes.

If you really care about security, PHP is a questionable choice anyway since it has a history of horrible exploits. However, it's not necessary to go overboard on security for gaming stuff. Just make sure you don't hold sensitive information on your server anywhere so that if you are hacked the damage is limited to the need to restore from backups.
Logged

agj
Level 10
*****



View Profile WWW
« Reply #4 on: February 06, 2010, 07:31:21 PM »

Alright then, sounds like I can manage with what I know/can learn. Thank you!

edit: Plus, I'll make sure to pester you people with my questions while learning all this stuff, so I can't go wrong.
Logged

encoder
Level 0
**


View Profile WWW
« Reply #5 on: February 09, 2010, 01:42:29 AM »

about 20 minutes to make and send the pictures as jpg, png, ... or directly as byteArray compressed or uncompressed.

start with this:
http://www.adobe.com/devnet/air/ajax/quickstart/jpeg_file_upload.html

be careful! you need user interaction to upload file request headers.
on backend you just accept them like anyother incoming image.
ho well it works: check out http://www.clic-clac.com/
when those numbers tick it actually transfers the 3D image and the 2048x2048 texture.
- this app also uploads all the data necessary to reconstruct the box.
I MADE THIS.

you can try to decompile, but it's unreadable. i was pretty a noob back then, but it was a step, nevertheless.
Logged

god is an instance of a class. who is the coder?
agj
Level 10
*****



View Profile WWW
« Reply #6 on: February 09, 2010, 10:43:43 AM »

Neat. Thanks a bunch for that link, will be useful.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic