Reputation: 607
I have an android application which uses php webservices. I have created the login.php which will validates the username, password sent from the android application. Once validated, a session is created such as follows:
session_start();
$_SESSION['userId'] = $id;
$_SESSION['username'] = $username;
On the client-side I have this:
HttpContext httpContext = new BasicHttpContext();
HttpResponse httpResponse = httpClient.execute(httpPost, httpContext);
HttpEntity entity = httpResponse.getEntity();
When I debug, I see that the httpReponse contains a PHPSESSID. I do know that I will need this information for comparison between the session_id on the server-side before executing any queries.
However, I do not know how to retrieve this "Set-Cookie" and send it to the server-side for comparison? A piece of code or tutorial will be extremely helpful.
Thank you
Upvotes: 3
Views: 12148