downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<Expect FunctionsPCNTL>
Last updated: Thu, 26 Jun 2008

expect_popen

(PECL expect:0.1-0.2.2)

expect_popen — Execute command via Bourne shell, and open the PTY stream to the process

Description

resource expect_popen ( string $command )

Execute command via Bourne shell, and open the PTY stream to the process.

Parameters

command

Command to execute.

Return Values

Returns an open PTY stream to the process'es stdio, stdout and stderr.

On failure this function returns FALSE.

Examples

Example #1 expect_popen() example

<?php
// Login to the PHP.net CVS repository:
$stream = expect_popen ("cvs -d :pserver:anonymous@cvs.php.net:/repository login");
sleep (3);
fwrite ($stream, "phpfi\n");
fclose ($stream);
?>

See Also



add a noteadd a note User Contributed Notes
Execute command via Bourne shell, and open the PTY stream to the process
There are no user contributed notes for this page.




<Expect FunctionsPCNTL>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs