2

I want to make an iPhone application that send some data to php web site.

Which is the best way to do it? Someone know how application like facebook do it? I can avoid to use SSL?

Thanks!

Klamore74
  • 578
  • 1
  • 6
  • 21
  • 1
    Did you even try looking in the API documentation for how to do networking? There are many ways to solve this problem. An appropriate answer depends entirely on the specifics of what you need to send and how comfortable you are with lower level networking APIs. – Steve Madsen Aug 21 '09 at 21:24
  • Why would you want to *avoid* SSL? It adds limited overhead and, if you're dealing with data that is *at all* sensitive (including usernames and passwords), it's a Good Thing for your users. – s4y Aug 25 '09 at 15:15
  • I try the way avoiding SSL because the domain host that normally I use do not support IT. But if with SSL I can avoid to write extra protection code on my iphone application, I will use SSL. If I use SSL can I forgot anything about security? Can I simply post data to URL and be sure that no one can read the call and do reverse engeenering? – Klamore74 Aug 25 '09 at 18:21

4 Answers4

1

Cocoa Touch has HTTP classes such as CFHTTP you can do this with - see this manual section

Paul Dixon
  • 295,876
  • 54
  • 310
  • 348
1

I came across this when I was looking into it a while back: http://www.ibm.com/developerworks/xml/library/x-iphonexmlphp/index.html

Brian
  • 8,418
  • 2
  • 25
  • 32
1

Here is an example using NSUrlRequest: Problem using NSURLRequest to POST data to server

Community
  • 1
  • 1
NSSec
  • 4,431
  • 1
  • 27
  • 29
0

You would have PHP code that does all the dirty work (save data, create users, search products, etc.). The iPhone app would just request PHP files via the different methods mentioned above (NSUrlRequest and friends) and send data to those requests. In a way, you would be creating an API for your web-based PHP application.

mga
  • 1,960
  • 1
  • 23
  • 31