Jump to content

Format output of system command...


chadrt
Go to solution Solved by 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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.