By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,751 Members | 1,156 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,751 IT Pros & Developers. It's quick & easy.

telnet

P: n/a
I am trying to write a script to take some info from a few variables
and use that info to telnet to a device and run a few commands, then
pipe the output to a file and name it. This would be placed into a
loop and run a number of times producing a number of files. I have not
been able to see if php can facilitate this. Can someone tell me how
they would go about this?
Jul 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
mark v. wrote:
I am trying to write a script to take some info from a few variables
and use that info to telnet to a device and run a few commands, then
pipe the output to a file and name it. This would be placed into a
loop and run a number of times producing a number of files. I have not
been able to see if php can facilitate this. Can someone tell me how
they would go about this?


You can simply open a socket to the server using fsockopen() and then
you can work with the socket just as if it was a file. You will have to
wait for it to request the username, enter it, password, enter it, then
you can send your commands.

Jul 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.