Search Unity

Unity and PHP: Question about using Session ID between different scenes

Discussion in 'Multiplayer' started by Mr.T, Apr 20, 2012.

  1. Mr.T

    Mr.T

    Joined:
    Jan 1, 2011
    Posts:
    546
    This is a spin-off from this thread.

    Tutorial: Unity and PHP login script - simple but useful by xandeck
    http://forum.unity3d.com/threads/24721-Tutorial-Unity-and-PHP-login-script-simple-but-useful/page6

    -- I made a small system using that tutorial wherein I use a script similar to the login script shown there. Then, once logged in, I get the session ID by getting my PHP script to output it to Unity.
    -- Once I get the session ID I store it in a variable on a script on a Persistent Game Object(An Object that doesn't get destroyed between scenes)
    -- Then when the new scene loads, I use this 'Persistent' variable to get the session ID and pass it as a form parameter if and when I need to communicate with php again.

    I have gotten all this to work without any apparent problems so far.

    My questions are
    1. What are the security implications of this kind of process?
    2. Am I doing this the hard way or is there a shortcut to moving session information between scenes?
     
  2. Mr.T

    Mr.T

    Joined:
    Jan 1, 2011
    Posts:
    546
    Just to expand on my questions

    I am aware of the sessions related security problems where it relates to the php side as mentioned here
    http://phpsec.org/projects/guide/4.html

    What I am looking for is any information about new problems that would develop when I use php in this manner with Unity
     
  3. DaReign

    DaReign

    Joined:
    Apr 12, 2013
    Posts:
    79
    Hi
    I'm also interested this. Did you experienced any success session attacks using this aproach ?