I know it can be done but its not working does anyone have any hints suggestions?

<?php
//$poc = shell_exec("cd /../cgi-bin/net; ./excalc.pl php where=$_REQUEST[where]");

//$parms = explode("&",$poc);
//$command = $_SERVER[DOCUMENT_ROOT].'/public_html/get_iplayer/get_iplayer.pl --info > testinfo.txt';

  $var2 = 'get_iplayer/get_iplayer.pl';
  print $var2 ."<br />";
  $var3 = 'get_iplayer > test1.txt';
  $var4 = $var2 .",".$var3;
  if(virtual(`$var2, $var3`)){


print "<br /> <p style=\"font-size:24px; color:#900; text-align:center;\">If you see this the file has executed and passed the variable</p>";
}
else{
	print "Error not executed";
}




?>

thanks
Peeps

    I have got this so far

    <?php shell_exec('$get_iplayer --info > output.txt'); ?>

    The output.txt file is being created but I am trying to pass the command info to it ????

      i use this to run perl scripts:

      virtual("/cgi-bin/filename.pl");
      

      that will output the output/result of the pl

        yeah i tried virtual but nothing is happening

          it works fine i use it daily i am trying to automate things with the above command line which is the same via ssh

            what happens when you run:

            virtual('get_iplayer/get_iplayer.pl','get_iplayer > test1.txt');

            in that php document (getting rid of the if/else stuff)

              ye since posting its now a one line affair lol just the file test1.txt is produced cause its not passing the command like --info

              i thot it was permissions so relaxed everthing on the server and still no joy

                Write a Reply...