Re: Making a service with php
| From: | John Yu | Date: | Wed, 06 Aug 2003 20:42:37 +0000 |
| Subject: | Re: Making a service with php | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-21050@lists.php.net to get a copy of this message | ||
Actually
I've found a good class to use for this.
http://www.php-tools.de
The patServer is very useful. It has class already setup to handle a
multi-thread server. Although, I wouldn't mind some help with the client
though.
For example.
Client ===> (request) ===> Server
Client <=== (response) === Server
That's the standard model. How does the client capture this response?
Basically, for what I want to do, the server and client has to do a lot of
handshaking and data transferring. Obviously, the data transferred are
encrypted (base64 with a lot of string shifts, not md5 because I need the
original data).
Here's the thing. The client doesn't just send data, it needs to receive
too. So in this case, does the client have to function like a server too?
Open the port, send data but also stay and listen on the port?
Here's a basic model of 1 scenario:
Client ==== (req: Auth : ClientID) ===> Server
Client <==== (ans: True) ===== Server
Client ==== (req: Status) =====> Server
Client <=== (ans: uptime || connect_user || data_type) === Server
Client ==== (req: disconnect) ====> Server
Client ==== \\ ===> Server
That's a basic model, since there are maybe 10 other requests the server and
client have to handle.
any help is greatly needed!
thanks
John
----- Original Message -----
From: "Sven Schnitzke" <Sven.Schnitzke@t-online.de>
To: "'John Yu'" <johnyu@revolutionhosting.net>
Sent: Wednesday, August 06, 2003 4:26 PM
Subject: AW: [PHP-WIN] Making a service with php
> I did some experimenting with socket handling in
> PHP, modifying the socket server example of the
> manual.
>
> Basically it works, but from version to version there are
> different issues, mainly concerning the behaviour with
> connections going down the hard way. IMO the best
> version up to now has been 4.3.1 with quite flawless
> functionality.
>
> If you are interested I can send a basic command line
> script to you containing the necessary steps to put up
> a multi connection server.
> --
> Sven
>
> > -----Ursprüngliche Nachricht-----
> > Von: John Yu [SMTP:johnyu@revolutionhosting.net]
> > Gesendet am: Mittwoch, 6. August 2003 15:50
> > An: php-windows@lists.php.net
> > Betreff: [PHP-WIN] Making a service with php
> >
> > Hi
> >
> > I would like to know if it's possible to have a PHP script that listens
on a
> > specific port for incoming requests. If so, how would one go about doing
> > that?
> >
> > If not, what language would be good to make that in on windows
plateform?
> >
> > thanks
> >
> > John
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >