News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Proc_Open Communicate with the Outside World
June 10, 2013 @ 09:43:01

On PHPMaster.com today there's a new tutorial from Timothy Boronczyk about using the proc_open function to kick off processes outside of PHP. It can be used to start up and manage (in a limited fashion) external process calls.

There are many ways we can interact with other applications from PHP and share data; there's web services, message queuing systems, sockets, temporary files, exec(), etc. Well, today I'd like to show you one approach in particular, proc_open(). The function spawns a new command but with open file pointers which can be used to send and receive data to achieve interprocess communication (IPC).

He starts off explaining one of the fundamental concepts behind working with processes - pipes, both anonymous and named. He then moves on to the use of proc_open and the three attributes it takes - command, pipes and references for output. He includes a more practical example showing it in use - a script that converts text with wiki markup into HTML output (via this tool).

0 comments voice your opinion now!
procopen tutorial processes command pipes

Link: http://phpmaster.com/proc-open-communicate-with-the-outside-world

blog comments powered by Disqus

Similar Posts

Kevin Schroeder's Blog: ZF2 Dependency Injection: Managing Configuration - Part 1

PHP-Tools Blog: Der Zauberlehrling - Sorcerer's Apprentice

Davey Shafik: Everything You Need to Know About OpCode Caches

NETTUTS.com: A Beginnerís Introduction to HTTP and REST

Lorna Mitchell's Blog: Building A RESTful PHP Server: Routing the Request


Community Events





Don't see your event here?
Let us know!


community list developer language framework introduction release refactor configure series podcast opinion testing symfony2 unittest code install laravel interview threedevsandamaybe

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework