Hello everyone…
I would like to post a quick compendium of how is it that I managed to solve my dilemma…
=-=-=-=-=-=-=-=-
=- HTML FORM =-=-
=-=-=-=-=-=-=-=-
Reboot
Empty Trash
=-=-=-=-=-=-=-=-=
=-= PHP FILE =-=
=-=-=-=-=-=-=-=-=
<?php
$Mplayer = $_GET["Mplayer"];
$command = $_GET["radio"];
$selRadio = $command;
$subset1 = "sed -e 's/localhost/";
$subset2 = "/g' ";
$subset3 = $command." > ".$command."1".".sh";
$final = $subset1.$Mplayer.$subset2.$subset3;
$finalLink= "./".$command."1".".sh";
exec($final);
shell_exec($finalLink);
=-=-=-===-=-
With this portion of the code, you may be able to understand the principle.
What I did was to gather the DNSNAME($Mplayer) of the unit to access and the predefined command ($command) from the form, once submitted, the php file pulls the information using "GET" (I know that it is not as safe, but at this point, you only have the information you already know).
Once I have the first variables set, I now can build a set of variables that will build a command that will perform a "sed" command to a file, which contains a shell script, then, will replace a predefined word in the file for a variable value , then save it on a different file. Once that is done, the script is ready to be used, so you call it.
That's it...
I hope this makes sense to you guys.
I am new to PHP so I am still in the early learning phases, so constructive criticism is welcome
I hope this gives you an idea of what is what I did and may help someone in the future.
Comments, suggestions and ideas to make this better are welcome.