iphone - Using NSStream to communicate with PHP? -


I am working on an iPhone project that requires data from PHP scripts to be executed during execution. My first thought was to use both ends / currents to connect to both, but I have trouble finding information about how to do this from the iPhone.

Can anyone down this path, have to give me some useful resources or some advice? Official documentation is getting better than desktop applications and uses a code that is not supported on the iPhone (i.e. NSHOS).

Update: Using this app is to get the log message from the execution script, so I can not use a simple HTTP request with JSON or XML. In many cases the page will be loaded by another customer, where the script relay / sends the log message to the iPhone.

Voting is evil You will chew through the battery to do this.

You may consider running an HTTP server on the iPhone checkout; It is an example code to use for the implementation of a HTTP server in Cocoa along with two-way communication.

PHP curl library (this can not be linked because the site does not believe me, just php.net search for it) is an easy, easy way to http request with a PHP .


Comments