Jump to content

Format output of system command...


chadrt

Recommended Posts

I hope I am able to explain this properly.  I am trying to build a way to adjust the volume of a remote computer used in conjuction wtih a ham radio, so I need to be able to give a couple guys the ability to adjust the volume without giving them SSH.  So I thought PHP could do this easilly!  But with limited knowledge I am struggling with the first few lines.

 

When run in a SSH session:

 

vol 12, 12, P
pcm 84, 84
speaker 39, 39
line 72, 72, P
mic 75, 75, R
cd 100, 100, P
pcm2 66, 66
igain 5, 5
line1 100, 100, P
phin 100, 100, P
phout 100, 100, P
video 100, 100, P

 

When run from PHP script:

 

vol 12, 12, P pcm 84, 84 speaker 39, 39 line 72, 72, P mic 75, 75, R cd 100, 100, P pcm2 66, 66 igain 5, 5 line1 100, 100, P phin 100, 100, P phout 100, 100, P video 100, 100, P video 100, 100, P

 

As you can see it is a huge run on that to the untrained eye would be quite confusing.  I would like the PHP script to display the information as it does on the console screen.

 

The command that is doing this is:

<?php

echo system("aumix -q");

?>

If I am in the wrong section please let me know but think this qualifies as basic PHP coding help...

 

Thank you to anyone and everyone!!  Have a beautiful day.

Link to comment
https://forums.phpfreaks.com/topic/295396-format-output-of-system-command/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.