Computing.Net > Forums > Web Development > PHP. Send Unix command to list of s

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

PHP. Send Unix command to list of s

Reply to Message Icon

Name: rhursto
Date: November 14, 2006 at 09:45:46 Pacific
OS: Solaris 10 6/06
CPU/Ram: UltraSparcIII / 1gb RAM
Product: v210
Comment:

Hi,
I'm new to php so this may be a simple answer.
I want to send a command from a php script to a list of servers (from a file stored in the apache docs root).
I have got as far as reading the file line by line and printing the servers line by line, but I can't get the 'shell_exec' command to send the command to each server. Probs just simple syntax error but I'm running out of ideas!!
Cheers.



Sponsored Link
Ads by Google

Response Number 1
Name: rhursto
Date: November 14, 2006 at 23:55:37 Pacific
Reply:

Just to follow up i'm doing it like this at the mo...

$output = shell_exec("rsh $servername df -k");
echo $output;


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: PHP. Send Unix command to list of s

PHP: sending data via GET method www.computing.net/answers/webdevel/php-sending-data-via-get-method/984.html

Compare 2 Lists of Words www.computing.net/answers/webdevel/compare-2-lists-of-words-/2500.html

Upgrading PHP 4.3.9 to 5.0.3 failed www.computing.net/answers/webdevel/upgrading-php-439-to-503-failed/1351.html