jasper182 Posted January 18, 2007 Share Posted January 18, 2007 I am trying to use the exec command to run sftp from the command line and transfer a file using a php script. However, I'm unsure how to send a password using exec when it is required. Is there a way to handle this with the exec command, or is there something better I could use for this situation? Thanks Quote Link to comment Share on other sites More sharing options...
ultrus Posted January 18, 2007 Share Posted January 18, 2007 I was just looking for the same thing yesterday. I found a class that handles command line stuff at phpclasses.org. Do a search for command line, and a couple good items surface towards the top. I'm not sure on the details yet, but it may inspire something?Hope this helps. :) Quote Link to comment Share on other sites More sharing options...
jasper182 Posted January 18, 2007 Author Share Posted January 18, 2007 I'll give it a look. Does anyone else know how to send passwords and such with Exec? It seems like it would be a common need, but I could be mistaken. Quote Link to comment Share on other sites More sharing options...
trq Posted January 18, 2007 Share Posted January 18, 2007 exec does nothing but execute commands in the shell. Id'e suggest, if your looking for ftp functionality to take a look at php's [url=http://php.net/ftp]ftp[/url] extension. Quote Link to comment 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.