I have an iphone app that sends and retrieves data from a php script.
I would like to connect to that script once, save some data into a $_SESSION variable. Then on subsequent calls be able to retrieve the content of that $_SESSION vars.
Is this possible?开发者_JS百科
Thanks
Yes, you will need to reuse the URLConnection to make multiple requests. Like for example one request to login and then one request to request data. The NSURLConnection will do the right thing and will keep track of cookies, which are the things that will keep your PHP session alive.
精彩评论