开发者

Connecting to URL from iPhone and persisting php session

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜