View Full Version : Execute external app and return results to a function

Apr 10, 2007, 12:14 AM
I'm making a program, called STK WebEdit Lite, where you can edit and preview web pages, I want to be able to execute PHP so the user can see how the PHP is interacting with the web page. Is there a way I can execute the php command using Cocoa programming? I know there's a way to do it, but I can't remember how.

Apr 10, 2007, 02:07 AM
Use NSTask (http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTask_Class/Reference/Reference.html) to spawn an external process. There is no special built in way for PHP.