php variable to modify a shell script

Hello:

I am being presented with a question…

I have written an HTML form, which gathers two variables, – $Mplayer & $command –

What I am trying to do is the following.

I have 5 specific commands I need to use on a regular basis, to maintain 0ver 1000 units distributed nationwide throughout a private WAN. I can reach each unit via the dns name of each unit… Which is the variable that feeds the $Mplayer, the $command is fed via the radio button form option of the form.

I wrote 5 different php files that contain the exec() command which calls a shell script that will run a specific command.

I need that the variable $Mplayer modifies the shell script to write the unit name in a certain part of the script without modifying the rest of the file and then sending that command to the right player.

I cannot figure out a way to modify a specific section of a file with php…

Any help will be appreciated!!

Thanks!

Hiroshi T

Sponsor our Newsletter | Privacy Policy | Terms of Service