title: how to hide system() output
body: <p>i am working on windows XP . i can successfully run a system() command through my browser by calling a TCL script that automates a ssh session. I also return a value from the script. however my problem is that the script dumps the entire ssh session in the browser.</p>
  <p>my php script looks like :</p>
  <pre><code>$lastline=system('&quot;C:\tcl\bin\tclsh.exe&quot; \path to file\filename.tcl '.$username.' '.$pass,$val);  
  </code></pre>
  <p>filename.tcl:</p>
  <pre><code>spawn plink -ssh $user@$host   
  expect &quot;password:&quot;  
  send &quot;$pass\r&quot;  
  expect &quot;\prompt:/-&gt;&quot;   
  set $return_value [string compare /..string../ $expect_out(buffer)]   
  /...some code...this runs fine/  
  exit $return_value   
  </code></pre>
  <p>everything runs fine and i get $return_value back correctly but the php file prints the result of the execution of the entire ssh session in my browser which looks like:</p>
  <blockquote>
  <p>Using username &quot;admin&quot;. admin@10.135.25.150's password: === /<em>*some text*</em>/ === \prompt:/-&gt;.../some text/</p>
  </blockquote>
  <p>i want to prevent the system() function from printing this in my browser<br />
  i have used the shell_exec() function but it returns the entire ssh session result (which i have parsed in the tcl script and got a precise value to return to the php script)
  is there a way i can do this without using shell_exec() but using system() instead</p>
  <p>thanks in advance</p>