By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,967 Members | 1,687 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,967 IT Pros & Developers. It's quick & easy.

PHP Parsing Shell Command Results

P: n/a
I am running a shell command via a php started ssh connection to a mail
server. I need to grab the data the shell command displays and then load
them into variables or an array ... Can anyone give me ideas on how to
do this ...

Note: I posted this on alt.php.sql ... so this is a cross post...

Scott
www.insaneweb.net
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
InsaneScouter wrote:
I am running a shell command via a php started ssh connection to a mail
server. I need to grab the data the shell command displays and then load
them into variables or an array ... Can anyone give me ideas on how to
do this ...


To execute a command use shell_exec() or the backtick operator

http://www.php.net/shell_exec
http://www.php.net/manual/en/languag....execution.php

If safe mode is on you won't be able to do this though.

--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.