From the shell, I interact with cadaver as follows:
My question:$> cadaver somehost.com
Authentication required for Documents access on server `somehost.com':
Username: <username>
Password:
dav:/fileserver/client/> quit
Connection to `somehost.com' closed.
How, from within a php script, do I interact with the shell or STDIN/STDOUT in this post-response manner? I wish to invoke cadaver via something like the following pseudo-code:
Code: Select all
// open stream
$resource = shell_exec to open connection stream with cadaver;
// push username to stream;
put($resource, 'username');
// push password to stream;
put($resource, 'password');
// if successful push standard cadaver commands to stream
get($resource, 'some_file.txt');