chadrt Posted April 10, 2015 Share Posted April 10, 2015 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, Ppcm 84, 84speaker 39, 39line 72, 72, Pmic 75, 75, Rcd 100, 100, Ppcm2 66, 66igain 5, 5line1 100, 100, Pphin 100, 100, Pphout 100, 100, Pvideo 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. Quote Link to comment https://forums.phpfreaks.com/topic/295396-format-output-of-system-command/ Share on other sites More sharing options...
Solution chadrt Posted April 10, 2015 Author Solution Share Posted April 10, 2015 A little more googling and paying attention I would have found the answer. Duhhhh me. <?php $volumes=shell_exec('aumix -q'); echo "<pre>$volumes</pre>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/295396-format-output-of-system-command/#findComment-1508656 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.