Re: fsockopen help!
| From: | TaoX { Brian Hinson; } | Date: | Fri, 25 Aug 2000 03:42:49 +0000 |
| Subject: | Re: fsockopen help! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13569@lists.php.net to get a copy of this message | ||
This is possible solely with PHP... though it will take a little programming
and knowledge of whatever protocol you are programming for... for instance..
first you need to set blocking if you want functions to wait for data if
there is none. Next you need to write get line functions for your protocol
as php fgets and others won't work, or atleast I can't get them to work and
thats because say for instance the smtp protocol... each line end with CRLF
control-linefeed.. so I write a get line that reads until these two chars
are detected and then I parse the line and send back replies accordingly and
wait for responses....
Hope this helps.
TaoX
----- Original Message -----
From: "Joseph H Blythe" <joe.blythe@binarylogic.com.au>
To: "Brian B." <dreamboy@aros.net>
Cc: <php-general@lists.php.net>
Sent: Thursday, August 24, 2000 8:58 PM
Subject: Re: [PHP] fsockopen help!
> "Brian B." wrote:
>
> > I am trying to create a program that will connect to a port and
> > then issue commands and then wait for responses and according
> > to the response that came back either exit or issue more commands,
> > how can i do this?
> >
>
> Brain,
>
> Look for threads sent from me over the past 2 weeks, as this is exactly
> what I have been trying to do, as long what you are trying to do isn't to
> complex php should handle this fine, I still haven't resolved some issues
> realating to php's network functions, and I doubt if I ever will, looks to
> me like I am going to have to write the whole thing in C and just call it
> fom php and test for the responses :-(
>
> hmm....
>
> Regards,
>
> Jsoeph
>
> --
> BoldFX / Binary Logic
> 257 Churchill Road Prospect South Australia 5082
> Ph: (08) 8342 0022 Fax: (08) 8342 0155
> mailto: joseph.blythe@binarylogic.com.au
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>