cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Curl Telnet

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 11 Mar 2002 09:47:24 +0100 (MET)

On Sat, 9 Mar 2002, David Rochwerger wrote:

(This reply is CC'ed to the curl-and-php list, please post follow-ups there.)

> I have spent many hours today, trying to figure out how to use telnet via
> PHP. Both the curl site and PHP site have almost zero documentation
> regarding telnet. I have perused all you mailing lists and there is no
> answer there either. I have looked at about 20 other related websites and
> mailing lists, and the question is often asked "how do i use telnet in PHP"
> but no-one actually answers it.

You just didn't look hard enough! ;-) Nah seriously, I understand that the
information is hard to find and there are reasons for this.

Per Auberg posted a question similar to your that is found here:
http://curl.haxx.se/mail/curlphp-2002-02/0025.html and I think my reply at
least partly answers to both his and your questions:
http://curl.haxx.se/mail/curlphp-2002-02/0027.html

> I know I can use the curl_init, curl_setopt,curl_exec and curl_close
> commands. I also know that there is an option that can be set called
> "TELNET_OPTIONS".

That's a start.

> All i want to know is the syntax (or perhaps an example) so that i can
> basically do the following:
> * connect (via telnet) to a host
> * send a string (login)
> * wait one second
> * send another string(password)
> * wait one second
> * send another string(a command).
> * close the connection
>
> This functionality could have a HUGE positive impact for current and future
> applications for my employer, increasing efficiency exponentially.

Please read my previous reply.

We need help from people to improve this area of libcurl.

Feel free to post more detailed questions, rants, complaints or whatever you
think is appropriate. ;-)

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-03-11