Security between Flash and PHP backend

If you have a front end with flash/flex and a backend with PHP.

How you then you ensure that casual browsers use not your swf file not get directly access the classes PHP backend providing the data?

I guess it's about authentication and authorization and sessions. I would be grateful if someone could point me to some good material on securing the php backend which connects the SWF, such as only the swf file can access the backend PHP classes. Or maybe I need to ensure the backend PHP classes themselves? Can someone give me a little push in the right direction?

All info session must be stored in the browser (cookies). If any part of your code handles the password/username etc - you do it wrong.

PHP session needs to store information (username, token authenticated, etc.). So, Yes, it matters little if you use SWF on your JS/HTML client.

Tags: Flex

Similar Questions

  • values between Flash and PHP

    I use AS2 and passing some values from flash to php, files flash is on page file1.php values pass very well, he pass values when the user, click the button

    When the button is pressed {var myVal:LoadVars = new LoadVars(); myVal.flieName = "fileid1"; myVal.send ("file1.php", "_parent", "POST");}

    Problem: when she passes the values, it refreshes the page and Flash file is also refreshed, and Flash from frame 1 and all the values on flash becomes by default, in other words, when the user click on "file1.php" is submitted, so that the page is refreshed what's the solution, which, after passing the values from the page rest or flash remains as it is (do not update content)

    use:

    {

    var receiveLV:LoadVars = new LoadVars();

    {receiveLV.onData = function (src)}

    }

    var myVal:LoadVars = new LoadVars(); myVal.flieName = "fileid1"; myVal.sendAndLoad ("file1.php", receiveLV, "POST"); }

  • High Score Table: writing a Simple with Flash and PHP text file

    I'm having a problem getting Flash to work with PHP that I need Flash to read and write to a text file on a server to store data simple name partition for a games Hi score table. I can read the text file in Flash fairly easily, but I also have to write to the file when a new high score is reached, so I need to use PHP to do that. Can I send data from flash to php by POST file, but so far it does not. The PHP file is confirmed that the work that I added an echo in the file that displays a message to verify that the server is running PHP - files were also uploaded to a remote server so I could test them correctly. Flash code is as follows:

    FileWriter php

    var myLV = new LoadVars();

    sendData() {} function

    //sets variable 'hsdata' to send to php

    myLV.hsdata = myText;

    myLV.send ("hiscores.php");

    }

    I believe that it sends the variable "myText" in the php file in a variable called 'hsdata' I want the php file to write to a text file. The mytext variable is just a long chain that has all of the partitions and the names in the scores. OK, XML would be best way to do it, but for the speed, I want to just get the basic features of work, so store a shot of simple text is sufficient for now. The PHP code that reads the Flash variable "hsdata" and wrote for the "scores.txt" text file is due to:

    <? PHP

    sets the variable to the data posted from flash

    $flashdata = $_POST ['hsdata'];

    File Manager opens the file and clears all content with arg w

    $fh = fopen ("scores.txt", "w");

    Adds data to the file

    fwrite ($fh, $flashdata);

    closes the file

    fclose ($fh);

    echo "php file works;

    ? >

    Any help with this would be greatly appreciated - once I get php to write text files simple I should be ok. Thank you.

    var outLV = new LoadVars();

    var inLV = new LoadVars();

    sendData() {} function

    outLV.hsdata = 'Hello from Flash';

    outLV.sendAndLoad ("http://www.mysite.com/hiscores/test23.php", inLV,"POST");

    }

    inLV.onLoad = {function (success)}

    If (success) {}

    sets the dynamic text box to show the variable sent by php

    statusTxt.text = this.phpmess;

    } else {}

    statusTxt.text = 'No Data Received';

    }

    };

    It works well and function of inLV.onLoad of the reports it receives data, but does not display the variable received from PHP. The PHP file is like this:

    <>

    $mytxt = $_POST ['hsdata'];

    $myfile = "test23.txt";

    $fh = fopen ($myfile, 'w');

    Adds data to the file

    fwrite ($fh, $mytxt);

    closes the file

    fclose ($fh);

    $mess = "Hello there php ';

    echo "phpmess =". "." $mess;

    ?>

  • Flash and PHP

    Hi, let's say I have a dynamic text field (name of the variable is "txt") that I wanted to read a PHP file and output the content from there.

    My AS code is:

    var myPHP:LoadVars = new LoadVars();

    myPHP.load ("variables.php"); my php file

    myPHP.onLoad = function (success: Boolean) {}

    If (success) {}

    txt = myPHP.msg; display content from php

    }

    }

    PHP code in variables.php:

    <? PHP

    Define Variables

    $msg = ($_GET ['msg']);

    Send it to Flash

    echo "msg = $msg;

    ? >

    If I key in the url as follows and send something to the msg:

    variables.php? MSG = Hello

    It will echo "msg = Hello", but the text inside the flash field turns out to be empty, not indefinite or anything like that. However, if I hardcode the php file from:

    $msg = "hello";

    It will always echo "msg = Hello" but the flash file displays the text accordingly.

    Can someone tell me why? Thank you!

    parseQueryF() returns an object with your variables as keys.   Thus,.

    var queryObj:Object = parseQueryF (your_url_string_with_query);

    trace (queryObj.sender, queryObj.Receiver);

    do not change below.

    function parseQueryF(s:String):Object {}

    var o: Object = {};

    var s1:String = s.split ("?") [1] ;

    var a:Array = s1.split ("&"); ")

    for (var i: int = 0; i<>

    var varVal: Array = a [i] .split ("=");

    o [varVal [0]] = varVal [1];

    }

    }

    p.s. Please mark answers useful/correct, if there is.

  • The question of security between FF and Java were solved (19 FF &amp; Java U17)?

    I get the following message when I connect to an interactive Web site that I use frequently. It began with Java Update 10 or almost and continues. Is still this issue resoved?

    "The version of Java you are in courses run has been known to cause problems of stability with Firefox. This problem has been reported to Oracle

    In the meantime, you will have to be
    Use a different web browser like Chrome or Internet Explorer
    OR
    Download Java.

    Java is not safe, period. This has nothing to do with your browser, just Java is horribly designed, and is not secure. If you are not going to use it, uninstall it. If you absolutely need it, then only activate it if necessary.

  • What is the difference between flash and flash builder professional?

    I want to create simple 2D flash games for computers.

    What is the best for this, and what are the advantages and disadvantages of each?

    They both use actionscript 3?

    -Thank you

    they use as3 and have the same script function.

    Flash offers more artistic freedom / drawing while flash builder has more components pre-integrated.

  • score update Flash and php

    Hi there, I wonder if someone can help me with this dashboard of php... our developers aren't being very useful...

    So problem is the score Panel is introduced at the beginning if the request and at the end to show your score when the game is over. The problem I have is refreshing scores (by replacing the current text in the boxes) rather than simply add the text again in the dynamic text boxes...

    Here is my code: -.

    tab var = "game1score" ;// updated for each game / / game2score, game3score...

    filesend var = 'receive.php ';

    var modesend = 'post';

    This is called when the scores are displayed at the beginning of the game

    private void onHighScoresButtonClick(event:MouseEvent):void {}

    var receptobjet = variableTransaction (filesend, modesend, tab, false, false);
    highScoresPage.rejouerButton.visible = false;
    highScoresPage.blueMan.visible = false;
    removeChildAt (0);
    addChildAt (highScoresPage, 0);
    }

    function variableTransaction (modesend, file tab, var1, var2) {}

    var URLload = new URLLoader();
    var URLrequest = new URLRequest (file);
    var variables: URLVariables = new URLVariables();

    variables. Tab = tab;
    variables.var1 = var1;
    variables.var2 = var2;

    If (modesend == 'post') {}
    URLrequest.method = URLRequestMethod.POST;
    } Else if (modesend == 'get') {}
    URLrequest.method = URLRequestMethod.GET;
    }

    If (var1 == false & & $var2 == false) {}

    URLload.dataFormat = pouvez;
    URLrequest.data = variable;
    URLload.load (URLrequest);

    URLload.addEventListener (Event.COMPLETE, modeComplet, false, 0, true);
    } else {}
    URLrequest.data = variable;
    URLload.load (URLrequest);

    var receptobjet = variableTransaction (filesend, modesend, tab, false, false);
    }

    }

    function modeComplet(event:Event) {}

    for (var p:uint = 1; p < = 10; p ++) {}

    var currentPseudo:String = 'Nick' + p;
    var currentScore:String = 'score' + p;

    If (event.target.data ["Nick' + p]) {}
    highScoresPage [currentPseudo] .appendText (["nickname" + p] event.target.data);
    If (event.target.data ["score" + p]) {}
    highScoresPage [currentScore] .appendText (["score" + p] event.target.data);
    } else {}
    highScoresPage [currentPseudo] .appendText ("\n");
    highScoresPage [currentScore] .appendText ("\n");
    }
    }
    }
    }

    private void gameEnd(event:Event):void {}

    Nick var = highScoresPage.pseudo0.text;
    var score = highScoresPage.score0.text;

    filesend var = "send.php";
    var modesend = 'post';

    variableTransaction (filesend, modesend, tab, nickname, score);

    var persoArray:Array = [gamePage.a1, gamePage.a2, gamePage.a3, gamePage.a4, gamePage.a5];
    var animalArray:Array = [gamePage.b1, gamePage.b2, gamePage.b3, gamePage.b4, gamePage.b5];
    var persoHitArray:Array = [gamePage.h1, gamePage.h2, gamePage.h3, gamePage.h4, gamePage.h5];
    var animalHitArray:Array = [gamePage.h6, gamePage.h7, gamePage.h8, gamePage.h9, gamePage.h10];
    for (var i: uint = 0; i < persoArray.length; i ++) {}
    (persoArray [i]) .removeEventListener (MouseEvent.MOUSE_DOWN, persoMouseDown);
    (persoArray [i]) .removeEventListener (MouseEvent.MOUSE_UP, persoMouseUp);
    (persoArray [i]) .buttonMode = false;
    }
    for (var j: uint = 0; j < persoArray.length; j ++) {}
    (animalArray [j]) .removeEventListener (MouseEvent.MOUSE_DOWN, animalMouseDown);
    (animalArray [j]) .removeEventListener (MouseEvent.MOUSE_UP, animalMouseUp);
    (animalArray [j]) .buttonMode = false;
    }
    for (var k: uint = 0; k < persoHitArray.length; k ++) {}
    (persoHitArray [k]) .visible = true;
    }
    for (var l:uint = 0; < animalHitArray.length; l ++) {}
    (animalHitArray [l]) .visible = true;
    }

    buttons.rulesButton.removeEventListener (MouseEvent.CLICK, onRulesButtonClick);
    buttons.startGameButton.removeEventListener (MouseEvent.CLICK, onStartGameButtonClick);
    buttons.highScoresButton.removeEventListener (MouseEvent.CLICK, onHighScoresButtonClick);
    buttons.infoButton.removeEventListener (MouseEvent.CLICK, onInfoButtonClick);
    completePage.linkButton.removeEventListener (MouseEvent.CLICK, onLinkButtonClick);
    mainTimer.removeEventListener (TimerEvent.TIMER, incrementCounter);

    countdownTimer.removeEventListener (TimerEvent.TIMER_COMPLETE, levelEnd);

    countdownTimerEnd.removeEventListener (TimerEvent.TIMER_COMPLETE, gameEnd);
    highScoresPage.rejouerButton.removeEventListener (MouseEvent.CLICK, onRejouerButtonClick);
    psuedoPage.goButton.removeEventListener (MouseEvent.CLICK, onGoButtonClick);

    gamePage = null;

    removeChildAt (0);
    addChildAt (highScoresPage, 0);

    highScoresPage.rejouerButton.visible = true;
    highScoresPage.blueMan.visible = true;

    }

    What do you mean by "every time" that I go to the page of best scores?   What happens when you click on the button of best scores?

  • What is the difference between the flash and the Prime Minister

    I know that Flash is generally used for breeding game and Prime Minister for video creation, but I saw the people can also use the Flash for video production as well. So I need to know what are the differences between the two men.

    Flash is often used for animation and interactive animation in particular.

    First is used for video production, but with some limitations, such as the version support, or lack thereof, can work with Flash animations.

    There are some ADJUSTABLE, as there is with the Premiere and After Effects, but each program has specific uses.

    Good luck and that's the short answer. Others will probably be able to give you a point-by-point difference between Flash and first.

    Hunt

  • How to read data in Adobe Flash and align it to look like it's column?

    I am doing an application that already exists, but I add a few improvements. I'll explain what this app is. There is a server and client side. The client side adds data to the Access database (the columns are time, name and surname). On the other computer is an application that displays this data (I don't know if he reads a database or another type of file, but I did a database). I know that server-side plays an .swf Flash file. This screen stays for about 30 seconds and then the application plays videos in the video player installed (ads, this model is connected to a TV) for some time and then the screen goes back to the display of the data.

    I'm 18 and I have very limited knowledge of Adobe Flash (I learned something at school). I've done completely client-side app. I now how to create server-side. My main problems are: how to connect to Adobe Flash to the database (is it possible to transfer this data to any other file that can be connected to the Flash?), how to read data from database for Flash and how to display it. I don't want to display the data in the grid. In the application that already exists, each word is like a new text (tool in Flash) and it is aligned. Is it possible to add a loop that creates new texts and plays database cell? How to refresh the Flash screen?

    I know it's a very complex issue, but your help would be very appreciated. I did on the client side in Delphi. If you need more information or if you do not understand something of my explanation, don't bother to ask. Thank you!

    You can transfer data back and forth between Flash and database on a server with PHP as the intermediary.  If you are looking for Gioogle use terms like 'AS # PHP MySQL tutorial' (fillin 2 or 3 for the ' # '), you should be able to find something to help you along there.

    What about adding new textfields and harmonizing, it depends on what version of as you use.  In AS3, you use just...

    var tField = new TextField();

    tField.x = a value to match.

    addChild (tField)

    As far as refreshing goes, this would require removing all Textfields you added and re-create new ones like you did the first time.  Yet once, it depends AS version that you use.  In AS3, you can use removeChild()

  • Flash and incompatibility

    I took a break to develop ads online about 5 years ago, while Flash was skyrocketing. With the introduction of HTML5 & flash incompatibility with smartphones and tablets is Flash still in service when creating Web sites and ads? Please could you me the relationship between Flash and HTML5 in the production of ads and Web sites today? Thank you.

    Yes, no flash player is necessary for html5 post flash pro files.

    Flash pro publishes html5 files so no further conversion is necessary.  some (or a lot of) published files mounting may be necessary for advanced options, but no other application (such as swiffy) is necessary.

    and the pro flash files work more surely than the published files swiffy.

  • Error: No mapping between account and the security of ID names was done when trying to setup of Dragon NaturallySpeaking 10.

    Original title: no mapping between account and the security of ID names was done.

    I am trying to set up my Dragon NaturallySpeaking 10 program. My computer (Dell Studio 1550 on Win 7 64 bit) has been recently reset and during the reinstallation of the DNS and the subsequent fine adjustment, I came across a page that wanted my username and admin password.. I plugged in and it came up with the error message: "no mapping between account and the security of ID names has been done." There is one account on my computer and my admin. account. If something has been lost in resetting? How can I fix / security ID card? Thank you for your help.

    Hi Hasky620,

    I recommend you contact the support of Dragon NaturallySpeaking for assistance:

    http://www.nuance.com/support/index.htm

  • store data in the backend with flash and AS3

    Hi friends,

    Greetings! Actually iam in applying for e-Learning, by reading our screen flash, student has to send their comments to the instructor, it will store in the database and read the same screen. If I use post it navigates to another screen aspx, it will last the student where they read. pls advice me... how can do this? is it possible to store data in db direct back-end... ?

    Thanks in advance...

    Kind regards

    Syed

    You can use the onunload method of javascript to detect when users close this window and you can use the class externalinterface actionscript for communication between javascript and actionscript.

  • How to exchange values between ASP and Flash?

    Hello, I want to swap values between ASP and Flash. I don't want to send it in the form of a querstring as:

    myswf.swf? var1 = value.

    I don't want my user to see or change this value.

    Thank you

    Use the urlloader class.

  • secure connection using AIR sending and php?

    Hello

    I have an AIR application in AS3 that connects to a database online, checks the connection information for the user account and connects if all is good.  Once connected, the user can update of database information, as well as replace the files in their home directory of the user.   So far it works great.

    Problem is that I have that configured to send raw data connection.  Once receives it PHP, it is chopped to check the version hashed in the database, but is there a way to chop and unhash a password sent by an AIR application?  Or a way to use HTTPS?

    In addition, about sessions, if you have a session in a browser, the session closes automatically when the browser closes, right?  So, how do a session near you opened via an Air application?  I guess you could start a closing of certain actions within the app, + when the application closes, but say the application crashes or the computer crashes - your session will still be be circulating out there open?

    Thanks again for your help.

    Shaun

    your hash table must be a way.  Chop the login in flash and check the hash database connection stored.

    http://www.jamesthompsondigital.com/

  • What relationships between flash cs4 and Pixel Bender Toolkit 2?

    I want to know the relationship between flash cs4 and Pixel Bender Toolkit 2. Now I use Pixel Bender Toolkit 2 to make effects, use file-> export filter for flash player, then it will create a .pbj file. I don't know how flash cs4 to use the .pbj file? I use google for search, but I can't find answer. Could someone give me example of detail on flash cs4 use the .pbj file?

    Thank you

    http://www.flepstudio.org/Forum/Flash-CS4-tutorials/4168-using-pixel-Bender-Flash-CS4.html

Maybe you are looking for