Php sessions and mobile applications?

You can use the session_id() function to fetch the PHP session ID and somehow include that in the XML you send to the device, and then at the other end you can extract the unique identifier, call session_id({unique_parameter}) to set the session ID and then call session_start() and you should be all set.

Up vote 0 down vote favorite share g+ share fb share tw.

I'm developing application that would communicate with a mobile app. My problem is as follows - my mobile app doesn't accept any session data - no $_GET variables, no cookies - all communication in both sides is done with xml and I can't change it by, for example adding some parameters to xml, because mobile app would not understand those. Now, I would like to use php sessions - mobile app sends me a unique identifier which I can use as a session key.

Will this work in an usual manner, like setting some variable in $_SESSION array, and then retrieving them in next request? Ps. I can't use database nor files... php session mobile link|improve this question asked Jun 6 '11 at 16:19marek797 59% accept rate.

You can use the session_id() function to fetch the PHP session ID and somehow include that in the XML you send to the device, and then at the other end you can extract the unique identifier, call session_id({unique_parameter}); to set the session ID and then call session_start(); and you should be all set.

You say it will, but before accepting your answer, I'll wait a bit - maybe someone will tell me that it won't work, and explain why :). – marek Jun 6 '11 at 16:29 Rest assured, it will work (provided you call session_id('the_id'); before session_start();. – Wrikken Jun 6 '11 at 16:32 Okay then, thank you guys :) – marek Jun 6 '11 at 16:35.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions