|
|
Posted by Connector5 on 07/16/81 11:34
Just tossing this in for completeness.
A very advanced solution would be to create a persistent script that is
executed to make a connection and use some type of feedback schema to send
and recieve the data.
I do this already with a php ircbot. One file runs persistently on the
server to maintain the irc connection, and my web application can send data
to it using something very similar to the old DDE. The entire project is in
php.
I will not get into the code because it's long and arduous, but here is the
gist of it:
0. persistent php script (outside of the web accessible folders)
1. maintains a connection to a server
2. using tick functions and read timeouts, simultaneously checks a database
for a "command"
3. processes the "command"
4. updates the database record with the "response"
0. web application (still php)
1. inserts a command row into the database (with a timestamp)
2. as user browses, checks the db for a response.
3. if user prematurely requests the response, report that it's not available
yet
4. handle timeouts et al.
Now, there is nothing that says you cant send a command like this to your
server script:
"copy /path/to/source host.com:/path/to/dest"
As long as your server script can understand it.
This may not be useful or feasible for you to do, but if you are coding ssh
communication stuff then you most likely have the skill to make this work.
"Mark" <segfalt@gmail.com> wrote in message
news:1134507915.337274.20870@o13g2000cwo.googlegroups.com...
> Thanks JW, I suspected as such when I attempted to serialize the ssh
> object manually and the connection was not preserved. I was just
> wondering if anyone had another way of doing it.
>
> Thanks anyway!
> Mark
>
Navigation:
[Reply to this message]
|