Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 137 | All time: 9,252 This week: 78 |
Version | License | PHP version | Categories | |||
exec 1.0.0 | MIT/X Consortium ... | 5 | Networking, PHP 5, Files and Folders, C... |
Description | Author | |
This package can execute system command piping input and output data sources. |
Execute system commands.
__STDIN__
// Execute Command Line:
$exec = new ExeProc();
$re = $exec->exec("md5sum");
// Open Http Socket Connection:
$tcpClient = new \Poirot\Stream\WrapperClient('http://www.raya-media.com:80', 'r');
$stream = new \Poirot\Stream\Streamable($tcpClient->getConnect());
# pipe all http data as input for command(md5sum)
$stream->pipeTo($re->pipes()->stdin());
# close write input data
$re->pipes()->stdin()->getResource()->close();
// Read Output result, as stream:
$md5 = $re->pipes()->stdout()->readLine();
if ($re->pipes()->to(iExecDescriptor::XCDSC_STDERR) !== '') {
// get stderr messages
// ...
}
// Close Process:
$re->close();
var_dump($md5); // md5 hash of website content: fa59c70d613d4d0085b4d869c46288c9
Files (10) |
File | Role | Description | ||
---|---|---|---|---|
Interfaces (2 files, 1 directory) | ||||
composer.json | Data | Auxiliary data | ||
ExeDescriptor.php | Class | Class source | ||
ExeProc.php | Class | Class source | ||
ExeProcuted.php | Class | Class source | ||
ExeProcutedPipes.php | Class | Class source | ||
README.md | Doc. | Documentation |
Files (10) | / | Interfaces |
File | Role | Description | ||
---|---|---|---|---|
Process (2 files) | ||||
iExec.php | Class | Class source | ||
iExecDescriptor.php | Class | Class source |
Files (10) | / | Interfaces | / | Process |
File | Role | Description |
---|---|---|
iExecProcess.php | Class | Class source |
iExecProcessPipe.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.