Displaying 1 result from an estimated 1 matches for "is_resource".
Did you mean:
  io_resource
  
2003 Oct 17
1
Script Control of sftp
...ror-output.txt", "a")
  );
  $Server = "myserver.pair.com";
  $User   = "holotech";
  $Pass   = "########";
  $sftp   = "/usr/bin/sftp";
  $process = proc_open(
    "$sftp $User@$Server",
    $descriptorspec,
    $pipes
  );
  if (is_resource($process)) {
    fwrite($pipes[0], $Password."\n");
    fclose($pipes[0]);
    while(!feof($pipes[1])) {
      echo fgets($pipes[1], 1024);
    }
    fclose($pipes[1]);
    $return_value = proc_close($process);
    echo "\ncommand returned $return_value\n";
  }
?>
-- 
Alan...