Link to home
Start Free TrialLog in
Avatar of sam000
sam000

asked on

Telnet using c#

I want to build an application in c# which is used to send file via telnet and receive acknowledgement.


Suppose I use cmd and type o 10.200.5.2 and connect to the remote server...
then it ask me to type login name
then it ask me to type password
then it show a screen with a list of options of me.

I want to choose option 1
then I type 1 and press enter

how can I do such things in PHP?
Avatar of Praveen Kumar
Praveen Kumar
Flag of India image

Avatar of sam000
sam000

ASKER

It is ok, but I need to get back the response and process that in the code using switch
Avatar of Kalpesh Chhatrala
Hope this helpful to you

Asynchronous socket communication example

http://www.codeproject.com/KB/IP/socketsincs.aspx
ASKER CERTIFIED SOLUTION
Avatar of Russell_Venable
Russell_Venable
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If PHP is what you are looking for and not C# first off your in the wrong section ;)

Next you should be looking at something that is already made for that purpose.
PHP Telnet

Make sure you parse the results with for your commands by using the switch example and then $Telnet->DoCommand("Command", $result); to send your command in response. Simple and easy enough.