if I nc to my server on port 23 I get the same thing. ie there is nothing
wrong. your going to have to emulate the telnet protocal now, thats just the
connect string.

--

  Chris Lee
  [EMAIL PROTECTED]




"Kancha" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> The following code generated garbase output. what is wrong ??
>
> <?php
>   $sp = fsockopen("localhost", 23);
>   if(!$sp){
>     echo "error";
>     exit;
>   }
>   socket_set_blocking($sp, FALSE);
>
>   function getLine(){
>     global $sp;
>
>     $op = fgets($sp, 1024);
>     while(empty($op)){
>       $op = fgets($sp, 1024);
>     }
>     return $op;
>   }
>
>   echo getLine();
> ?>
>
> The output was as follows:
>
> [root@ispms html]# php telnet.php
> X-Powered-By: PHP/4.1.0
> Content-type: text/html
>
> ? #'[root@ispms html]#
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to