sockets and telnet

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
devork
Forum Contributor
Posts: 213
Joined: Fri Aug 08, 2003 6:44 am
Location: p(h) developer's network

sockets and telnet

Post by devork »

I am try to connect to a server by php function
socket_connect("server",4433)
at port 4433
and then when it connect telnet gives some text
I am trying to read that text by socket_read(....) on client side but no output
any help...?
User avatar
devork
Forum Contributor
Posts: 213
Joined: Fri Aug 08, 2003 6:44 am
Location: p(h) developer's network

Post by devork »

i have done something about telnet
but one more thing
ok what shoud i use
fwrite($resource,"Action: Login")
what sequence of \n, \r shoud i use after ...Login to write it to that socket :wink:
User avatar
BigE
Site Admin
Posts: 139
Joined: Fri Apr 19, 2002 9:49 am
Location: Missouri, USA
Contact:

Post by BigE »

You might want to check out the Telnet RFC That will explain to you what to do when you connect to a telnet server... I'm not familiar with that protocol, otherwise I'd help you out. :)
User avatar
devork
Forum Contributor
Posts: 213
Joined: Fri Aug 08, 2003 6:44 am
Location: p(h) developer's network

Post by devork »

it is resolved
pattern is \r\n
Post Reply