php3-list | 199807
Date: 07/20/98
- Next message: Joe Wronkowski: "[PHP3] php installed but when calling a *.php3 or phtml page it wants to save"
- Previous message: Zeev Suraski: "[PHP3] 3.0.2a Win32 binary and COM module usage"
- Next in thread: Cees Hek: "Re: [PHP3] fsockopen to a telnet port"
- Reply: Cees Hek: "Re: [PHP3] fsockopen to a telnet port"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hey there,
I'm having some trouble connecting to a telnet port. I don't have any
trouble with this code:
<?
$file = fsockopen("server.name.com", "110"); ### 110 is the pop3 port
fputs($file, "user username\n"); ### puts in the username
fputs($file, "pass password\n"); ### puts in the password
fputs($file, "quit\n");
fpassthru($file); ### displays info
?>
This connects to the pop3 port on the mail server.
But this code:
<?
$file = fsockopen("server.name.com", "23"); ### 23 is the telnet port
fputs($file, "username\n"); ### puts in the username at the username
prompt
fputs($file, "password\n"); ### puts in the password at the pass word
prompt
fputs($file, "logout\n");
fpassthru($file); ### doesn't display info, but I wish it would
?>
For some reason the socket connection does not return any information, and
the program gets stuck when it gets to the fpassthru() line.
Any suggestions on what I'm doing wrong or a different way to do this?
Thanks,
Adam Roderick
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3
- Next message: Joe Wronkowski: "[PHP3] php installed but when calling a *.php3 or phtml page it wants to save"
- Previous message: Zeev Suraski: "[PHP3] 3.0.2a Win32 binary and COM module usage"
- Next in thread: Cees Hek: "Re: [PHP3] fsockopen to a telnet port"
- Reply: Cees Hek: "Re: [PHP3] fsockopen to a telnet port"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

