fixed it now by adding ascii(10) to reply from server BUT what if i use
fgetc ?

does anyone know the ascii value for EOF ?

cheers,

Steve

> -----Original Message-----
> From: Steve Brett [mailto:[EMAIL PROTECTED]]
> Sent: 05 July 2001 12:58
> To: Php-General (E-mail)
> Subject: [PHP] Socket Madness !!!!
> 
> 
> Hi,
> 
> I need to set up a sockets connection to a server that was written in
> Delphi.
> 
> Using the following code I can connect to the socket and send 
> a message
> through it but don't get a reply back ...
> 
>       {
>       echo "Socket opened ok ... sending message<br>";
>       $message=sprintf("Steve%c Hello world",255);
>       fputs($socket,$message);
>       echo fgets($socket, 255);
>       fclose($socket);
>       }
> 
> the socket is opened using fsockopen() and the message get 
> there but i only
> get the reply when the remote socket server is closed ...
> 
> can anyone help ?
> 
> thanks in advance
> Steve Brett 
> Internal Development
> tel: 3263 
> EMIS Ltd. 
> "Privileged and /or Confidential information may be contained in this
> message. If you are not the original addressee indicated in 
> this message (or
> responsible for delivery of the message to such person), you 
> may not copy or
> deliver this message to anyone. In such case, please delete 
> this message,
> and notify us immediately. Opinions, conclusions and other information
> expressed in this message are not given or endorsed by my 
> firm or employer
> unless otherwise indicated by an authorised representative 
> independently of
> this message."
> Egton Medical Information Systems Limited. Registered in England. No
> 2117205. 
> Registered Office: Park House Mews, 77 Back Lane, Off 
> Broadway, Horsforth,
> Leeds, LS18 4RF
> 
> 
> 
> -- 
> 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]
> 

-- 
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