Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
On Mon, Mar 28, 2011 at 5:14 PM, Curtis Maurand wrote: > > > Nathan Nobbe wrote: > > On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > > > >> If you need high performance you probably already know that it will be > >> very > >> expensive CPU wise if workers are spawned on each request. If

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Curtis Maurand
I have a machine with several websites one of which is quite busy this time of year.  I have another that had its joomla comments on and open and the spammers found it.  They managed to get 700,000 comments into the system before we caught it, but the traffic and strain on the MySQL server and t

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Bostjan Skufca
"It works pretty well until its under attack by the spammers." Can you elaborate/explain further? b. On 29 March 2011 01:14, Curtis Maurand wrote: > > > Nathan Nobbe wrote: > > On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > > > >> If you need high performance you probably already k

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Curtis Maurand
Nathan Nobbe wrote: > On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > >> If you need high performance you probably already know that it will be >> very >> expensive CPU wise if workers are spawned on each request. If you don't, >> I >> would not bother with daemon and just use xinetd

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > If you need high performance you probably already know that it will be very > expensive CPU wise if workers are spawned on each request. If you don't, I > would not bother with daemon and just use xinetd. You can always add > daemon-handlin

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Bostjan Skufca
If you need high performance you probably already know that it will be very expensive CPU wise if workers are spawned on each request. If you don't, I would not bother with daemon and just use xinetd. You can always add daemon-handling stuff later on. Well I do hope you find a good working solutio

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
On Mon, Mar 28, 2011 at 12:38 PM, Bostjan Skufca wrote: > Xinetd will definitely be faster way than coding your daemon in PHP. > In this case: > You have to consider many other things as well: > - do your worker processes run under various UIDs (do they do > setuid/setgid)? > no > - do your w

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Bostjan Skufca
? - do you need inter-worker communication? - resource locking issues, etc? What is your goal, the function of your daemon/socket server? You can find PHP socket server implementations around the net already: - Nanoserv being one: http://nanoserv.si.kz/ - something of "mine": https://

[PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
Hi, I'd like to bat around some pros / cons of selecting xinetd to implement a socket server. From my perspective the list is something like this: xinetd pros . no need to rewrite forking functionality, 'server' can be written as simple php script . forking potentially faster than php-based im

Re: [PHP] socket multithreading problem

2010-07-29 Thread Rasmus Lerdorf
On 7/27/10 7:04 AM, Ümit CAN wrote: > I use PHP socket programming and I wish multithreading operation of the socket . > When I have many requests on this socket , before the first one request is > anwered , the second request is not aswered till the first one is finished. >

Re: [PHP] socket multithreading problem

2010-07-29 Thread Per Jessen
Ümit CAN wrote: > I use PHP socket programming and I wish multithreading operation of > the socket . Don't use PHP, use C - it'll save you a lot of trouble in this context. -- Per Jessen, Zürich (15.4°C) -- PHP General Mailing List (http://www.php.net/) To unsubscr

[PHP] socket multithreading problem

2010-07-27 Thread Ümit CAN
Hi All; I use PHP socket programming and I wish multithreading operation of the socket . When I have many requests on this socket , before the first one request is anwered , the second request is not aswered till the first one is finished. How can both requests work together

[PHP] socket problem

2010-07-20 Thread Ümit CAN
Hi All; I have got problem on socket. First client send query on socket and running process for first client, socket blocking. Second client same time send query socket, accept second client but not runing process. Waiting first client end process. How can I do multi client runing process

Re: [PHP] Socket error

2009-06-29 Thread Luke
2009/6/29 Daniel Brown > On Mon, Jun 29, 2009 at 02:42, Luke wrote: > > Hey guys, getting an odd error here... The code involved: > [snip!] > >Luke, > >Just a friendly reminder: for future reference, please don't start > a second thread on the list until the first is closed out --- > part

Re: [PHP] Socket error

2009-06-29 Thread Daniel Brown
On Mon, Jun 29, 2009 at 02:42, Luke wrote: > Hey guys, getting an odd error here... The code involved: [snip!] Luke, Just a friendly reminder: for future reference, please don't start a second thread on the list until the first is closed out --- particularly if it's the same subject. Som

Re: [PHP] Socket error

2009-06-29 Thread Per Jessen
Luke wrote: > Hey guys, getting an odd error here... The code involved: > > $master_socket = socket_create_listen($this->port); > > socket_bind($master_socket, '127.0.0.1', $this->port); > socket_listen($master_socket); > socket_set_option($master_

Re: [PHP] Socket error

2009-06-28 Thread Luke
2009/6/29 Stuart > 2009/6/29 Luke : > > Hey guys, getting an odd error here... The code involved: > > > >$master_socket = socket_create_listen($this->port); > > > >socket_bind($master_socket, '127.0.0.1', $this->port); > >socket_listen($master_socket); > >

Re: [PHP] Socket error

2009-06-28 Thread Stuart
2009/6/29 Luke : > Hey guys, getting an odd error here... The code involved: > >            $master_socket = socket_create_listen($this->port); > >            socket_bind($master_socket, '127.0.0.1', $this->port); >            socket_listen($master_socket); >            socket_set_option($master_so

[PHP] Socket error

2009-06-28 Thread Luke
Hey guys, getting an odd error here... The code involved: $master_socket = socket_create_listen($this->port); socket_bind($master_socket, '127.0.0.1', $this->port); socket_listen($master_socket); socket_set_option($master_socket, SOL_SOCKET, SO_REUS

[PHP] Socket error

2009-06-28 Thread Luke
Hey guys, getting an odd error here... The code involved: $master_socket = socket_create_listen($this->port); socket_bind($master_socket, '127.0.0.1', $this->port); socket_listen($master_socket); socket_set_option($master_socket, SOL_SOCKET, SO_REUS

Re: [PHP] socket communication programming

2009-06-14 Thread Andrew Ballard
On Sat, Jun 13, 2009 at 4:58 PM, HELP! wrote: > On Sat, Jun 13, 2009 at 10:28 PM, Manuel Lemos wrote: > >> Hello, >> >> on 06/12/2009 11:41 AM HELP! said the following: >> > hi >> > I can not get the stream_get_contents() to work. it's returning empty. >> > If you have a login details "ALOGINPASS

Re: [PHP] socket communication programming

2009-06-13 Thread HELP!
Thanks. I need to access remote data via TCP. Connecting to the given port has been successful but getting acknowledgement from the remote server after sending the login packet is a problem. Is there anything wrong sending the login packet in strings? or what is the best way? I probably think the

Re: [PHP] socket communication programming

2009-06-13 Thread Manuel Lemos
Hello, on 06/12/2009 11:41 AM HELP! said the following: > hi > I can not get the stream_get_contents() to work. it's returning empty. > If you have a login details "ALOGINPASS 1A" cant you just fwrite($ft, > "ALOGINPASS 1A"); or do you need to add other things > > > what is the meaning of this

Re: [PHP] socket communication programming

2009-06-12 Thread Shawn McKenzie
HELP! wrote: > hi > I can not get the stream_get_contents() to work. it's returning empty. > If you have a login details "ALOGINPASS 1A" cant you just fwrite($ft, > "ALOGINPASS 1A"); or do you need to add other things > Depends upon what the server is expecting. > > what is the meaning of this s

[PHP] socket communication programming

2009-06-12 Thread HELP!
hi I can not get the stream_get_contents() to work. it's returning empty. If you have a login details "ALOGINPASS 1A" cant you just fwrite($ft, "ALOGINPASS 1A"); or do you need to add other things what is the meaning of this string" GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept

[PHP] [php] socket connection problem

2009-05-27 Thread help
Hi, I am trying to connect to specific server using but I have the below error messagr. Whta could be the problem? $fp = fsockopen($ip,$port, $errno, $errstr, $timeout); fwrite($fp,$LRG); //return "$errstr ($errno)"; if (!$fp) { echo "$errstr ($errno)"; //"$errstr ($errno)\n"; } *A con

[PHP] Socket connection not closing

2009-04-20 Thread Martín Marqués
I have a socket application written a few years ago in PHP which receives information and does something (not relevant at the moment). The program that connects is written in PHP with PEARs Net_Socket. This socket is really taken from the socket example in the PHP docs. It's been working OK for qu

Re: [PHP] Socket create with ssl server

2008-04-18 Thread Alan Willsher
Is it possible to do this with CURL instead of the socket functions $bindip = 'xx.xx.xx.xx'; $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($sock, $bindip); socket_connect($sock, 'ssl://epp.server.com', 80); ie bind an IP and connect to an ssl:// address Trying to connect via

RE: [PHP] Socket create with ssl server

2008-04-10 Thread Wolf
lsher <[EMAIL PROTECTED]> Sent: Thursday, April 10, 2008 5:20 PM To: php-general@lists.php.net Subject: [PHP] Socket create with ssl server Hi how do you use socket_create with an ssl server ie I would do something like $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($sock

Re: [PHP] Socket create with ssl server

2008-04-10 Thread Greg Bowser
The sockets extension is a much "lower" level interface to sockets than the fsockets/stream_ functions in PHP. Unlike with the aforementioned, with the sockets extension, you can't just expect to magically get an ssl connection by using "ssl://". Your problem is that the sockets extension has no

Re: [PHP] Socket create with ssl server

2008-04-10 Thread Nirmalya Lahiri
--- Alan Willsher <[EMAIL PROTECTED]> wrote: > Hi how do you use socket_create with an ssl server > > ie I would do something like > > $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); > socket_bind($sock, $sourceip); > socket_connect($sock, 'server.com', 2043); > > but if I do > > $sock =

[PHP] Socket create with ssl server

2008-04-10 Thread Alan Willsher
Hi how do you use socket_create with an ssl server ie I would do something like $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($sock, $sourceip); socket_connect($sock, 'server.com', 2043); but if I do $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($sock, $s

RE: [PHP] Socket how to die if connection broken

2007-10-08 Thread Instruct ICC
> I dont get that error > > Warning: socket_write() expects parameter 1 to be resource, null given in > /path/script.php on line 34 > > but just the original error msg > > Warning: socket_write(): unable to write to socket [32]: Broken pipe in Multiple times still? Or just the one time? Use h

RE: [PHP] Socket how to die if connection broken

2007-10-08 Thread Instruct ICC
It looks like you didn't pass in a socket resource as the first parameter to socket_write. http://php.he.net/manual/en/function.socket-write.php > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED]; php-general@lists.php.net > Date: Mon, 8 Oct 2007 19:51:15 +0100 > Subject: Re: [P

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread chris
, October 08, 2007 7:43 PM Subject: RE: [PHP] Socket how to die if connection broken Remove the @ and see if you get any useful message. From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: php-general@lists.php.net Date: Mon, 8 Oct 2007 19:04:45 +0100 Subject: Re: [PHP] Socket how to die if conn

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread chris
Hi I got this error Warning: socket_write() expects parameter 1 to be resource, null given in /path/script.php on line 34 Thanks - Original Message - From: "Instruct ICC" <[EMAIL PROTECTED]> To: Sent: Monday, October 08, 2007 7:43 PM Subject: RE: [PHP] Sock

RE: [PHP] Socket how to die if connection broken

2007-10-08 Thread Instruct ICC
Remove the @ and see if you get any useful message. > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > CC: php-general@lists.php.net > Date: Mon, 8 Oct 2007 19:04:45 +0100 > Subject: Re: [PHP] Socket how to die if connection broken > > Hi Stut Ive tried your example but

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread chris
Hi Stut Ive tried your example but still cant get it to work. - Original Message - From: "Stut" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Monday, October 08, 2007 5:26 PM Subject: Re: [PHP] Socket how to die if connection broken [EMAIL PROTECTE

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread chris
AIL PROTECTED]> To: Sent: Monday, October 08, 2007 5:27 PM Subject: RE: [PHP] Socket how to die if connection broken But if the socket connection gets broken it creates an error msg Warning: socket_write(): unable to write to socket [32]: Broken pipe in Warning: socket_write(): unable to wri

RE: [PHP] Socket how to die if connection broken

2007-10-08 Thread Instruct ICC
> But if the socket connection gets broken it creates an error msg > > Warning: socket_write(): unable to write to socket [32]: Broken pipe in > Warning: socket_write(): unable to write to socket [32]: Broken pipe in > Warning: socket_write(): unable to write to socket [32]: Broken pipe in > >

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread Stut
[EMAIL PROTECTED] wrote: Hi I have a socket connection like so.. $sourceip = '84.234.18.16'; // ip you want to bind to $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($sock, $sourceip); socket_connect($sock, 'dac.nic.uk', 2043); if ($socket === false) { $errorcode = socket

[PHP] Socket how to die if connection broken

2007-10-08 Thread chris
Hi I have a socket connection like so.. $sourceip = '84.234.18.16'; // ip you want to bind to $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($sock, $sourceip); socket_connect($sock, 'dac.nic.uk', 2043); if ($socket === false) { $errorcode = socket_last_error(); $errorms

Re: [PHP] Socket takes a long time to 'finish'

2007-08-29 Thread Richard Lynch
Try just leaving out the fclose($socket) and let PHP close it at the end for you... It's probably not IDEAL, but it may at least get you moving forward with other bigger issues. Check the http://bugs.php.net/ bugs as well -- Might be something in there of use. There will be a few zillion bogus o

Re: [PHP] Socket takes a long time to 'finish'

2007-08-29 Thread Alvar Saenz-Otero
Thank you! Either of the two options fixed it! My guess is that HTTP 1.0 does not need the "Connection: close" while HTTP 1.1 does. So I had to fix one of the two... I did both, just so that my script has better compatibility in the future. Thanks again, Alvar At 06:59 2007/08/29, Eddie

Re: [PHP] Socket takes a long time to 'finish'

2007-08-29 Thread Eddie Dunckley
On Wed 29 Aug 07, Alvar Saenz-Otero wrote: > Hello, > I have a small but somewhat annoying issue. > Whenever I open a socket to another server, the file is read very > quickly, but it takes the up to 30 seconds or so to close the > connection... > > Here is what I do: >$sever = "server.mit.edu"

[PHP] Socket takes a long time to 'finish'

2007-08-29 Thread Alvar Saenz-Otero
Hello, I have a small but somewhat annoying issue. Whenever I open a socket to another server, the file is read very quickly, but it takes the up to 30 seconds or so to close the connection... Here is what I do: $sever = "server.mit.edu"; $url = "/link"; $port = 80; $user_agent = $_SE

Re: [PHP] Socket problem plz read.

2007-02-01 Thread Németh Zoltán
On cs, 2007-02-01 at 14:45 +0100, Scripter47 wrote: > Richard Lynch skrev: > > On Wed, January 31, 2007 9:39 am, Németh Zoltán wrote: > >> On sze, 2007-01-31 at 16:26 +0100, Scripter47 wrote: > >>> I'm making a simple socket server that just receive some data, and > >>> then > >>> send some data ba

Re: [PHP] Socket problem plz read.

2007-02-01 Thread Scripter47
Richard Lynch skrev: On Wed, January 31, 2007 9:39 am, Németh Zoltán wrote: On sze, 2007-01-31 at 16:26 +0100, Scripter47 wrote: I'm making a simple socket server that just receive some data, and then send some data back again to the client. EDIT: I forgot to tell that i need help! I have sea

Re: [PHP] Socket problem plz read.

2007-01-31 Thread Richard Lynch
On Wed, January 31, 2007 9:39 am, Németh Zoltán wrote: > On sze, 2007-01-31 at 16:26 +0100, Scripter47 wrote: >> I'm making a simple socket server that just receive some data, and >> then >> send some data back again to the client. >> >> EDIT: >> I forgot to tell that i need help! >> >> I have sear

Re: [PHP] Socket problem

2007-01-31 Thread Richard Lynch
On Tue, January 30, 2007 2:31 pm, Scripter47 wrote: > I'm making a simple socket server that just receive some data, and > then > send some data back again to the client. > > it is a program that send data by sockets, (not port 80) > > It has to a simple solution :) > > plz ask for more infomation.

Re: [PHP] Socket problem plz read.

2007-01-31 Thread Scripter47
Stut skrev: Németh Zoltán wrote: On sze, 2007-01-31 at 16:26 +0100, Scripter47 wrote: I'm making a simple socket server that just receive some data, and then send some data back again to the client. EDIT: I forgot to tell that i need help! I have search around for hours now, and the examples

Re: [PHP] Socket problem plz read.

2007-01-31 Thread Stut
Németh Zoltán wrote: On sze, 2007-01-31 at 16:26 +0100, Scripter47 wrote: I'm making a simple socket server that just receive some data, and then send some data back again to the client. EDIT: I forgot to tell that i need help! I have search around for hours now, and the examples are always no

Re: [PHP] Socket problem plz read.

2007-01-31 Thread Németh Zoltán
On sze, 2007-01-31 at 16:26 +0100, Scripter47 wrote: > I'm making a simple socket server that just receive some data, and then > send some data back again to the client. > > EDIT: > I forgot to tell that i need help! > > I have search around for hours now, and the examples are always not what > I

Re: [PHP] Socket problem plz read.

2007-01-31 Thread Scripter47
I'm making a simple socket server that just receive some data, and then send some data back again to the client. EDIT: I forgot to tell that i need help! I have search around for hours now, and the examples are always not what I needed :( the program is written in Python, if that helps, and is

Re: [PHP] Socket problem

2007-01-30 Thread Stut
Scripter47 wrote: I'm making a simple socket server that just receive some data, and then send some data back again to the client. Lovely. it is a program that send data by sockets, (not port 80) Excellent. It has to a simple solution :) Simple is usually the best way to go. plz ask f

[PHP] Socket problem

2007-01-30 Thread Scripter47
I'm making a simple socket server that just receive some data, and then send some data back again to the client. it is a program that send data by sockets, (not port 80) It has to a simple solution :) plz ask for more infomation. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] Socket communications question

2006-10-13 Thread Richard Lynch
On Fri, October 13, 2006 11:15 am, Jeff Lanzarotta wrote: How did you open the socket? Did you check that it's valid? You've already written to it, right?... And Java got the data you sent? One hack would be to try opening one socket just for reading and one just for writing... Might work out

[PHP] Socket communications question

2006-10-13 Thread Jeff Lanzarotta
Hello, I am trying to get a php web page to communicate with a java application with little success... I can get the php page to send the request to the java application, just fine. But when the java app sends the response back, the php page does not seem to get it... As a side note, the java ap

Re: [PHP] socket https.

2006-10-05 Thread Richard Lynch
On Thu, October 5, 2006 3:30 pm, João Cândido de Souza Neto wrote: > I´m using CURL, but it cannot send any data to server by POST mothod. > > Have you got any example abaut this to show me? $curl = curl_init(); curl_setopt($curl, 'https://example.com/example.php'); curl_setopt($curl, CURLOPT_POST

Re: [PHP] socket https.

2006-10-05 Thread Jo�o C�ndido de Souza Neto
I´m using CURL, but it cannot send any data to server by POST mothod. Have you got any example abaut this to show me? Thanks. ""Richard Lynch"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > You may want to look at using CURL which handles all the grunge of the > SSL exchang

Re: [PHP] socket https.

2006-10-05 Thread Jo�o C�ndido de Souza Neto
Out of PHP 4.3.0 fsockopen has been fixed up to do that. ""Richard Lynch"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > You may want to look at using CURL which handles all the grunge of the > SSL exchange... > http://php.net/curl > > Or maybe fsockopen has been fixed up to d

Re: [PHP] socket https.

2006-10-05 Thread Richard Lynch
You may want to look at using CURL which handles all the grunge of the SSL exchange... http://php.net/curl Or maybe fsockopen has been fixed up to do that also?... On Thu, October 5, 2006 12:33 pm, João Cândido de Souza Neto wrote: > Hi everybody. > > I must to connect a https server by a fsockop

[PHP] socket https.

2006-10-05 Thread Jo�o C�ndido de Souza Neto
Hi everybody. I must to connect a https server by a fsockopen but it seems not working. I´ve got openssl instaled in my php and when i run the follow line. $sock = fsockopen("ssl://wwws.aymorefinanciamentos.com.br", 80, $errno, $errstr, 30); My var $sock returns false without any error string

Re: [PHP] Socket Functions in PHP

2006-05-08 Thread Richard Lynch
On Sun, May 7, 2006 11:22 pm, Oliver John V. Tibi wrote: > while ($data != "") { > $document .= $data; > $data = socket_read( $resource, 1024 ); $logman->append("Read " . strlen($data) . " bytes"); > } This is going to help

[PHP] Socket Functions in PHP

2006-05-07 Thread Oliver John V. Tibi
Hi all, I suspect I'm having problems with socket functions within my PHP application running on Red Hat 2.4.21-4.EL #1/PHP 4.3.2/Apache 2.0.46. Below is a sample code listing: function sendRequest($strRequest) { $parse

[PHP] Socket Select()

2005-12-09 Thread will
Hi, I'm working on writing a multi-client socket server and have a question about the socket_select() function. I've read through lots of example source on the web using BSD sockets and select(). For some reason none of them ever populate the write fd set.They only populate the read fd set.

Re: [PHP] Socket functions

2005-08-30 Thread Philippe Reynolds
WOW...so much simpler..thank you very much!! Cheers Phil style='FONT-SIZE:11px;FONT-FAMILY:tahoma,sans-serif'>size=1> From: Burhan Khalid <[EMAIL PROTECTED]>To: Philippe Reynolds <[EMAIL PROTECTED]>CC: php-general@lists.php.netSubject: Re: [PHP] Socket functio

Re: [PHP] Socket functions

2005-08-29 Thread Burhan Khalid
Philippe Reynolds wrote: Greetings, When I do an ifconfig in unix, I see the the IP address for the my ethernet. It follows something called inet. Would anyone know who to manipulate the socket functions to be able to extract the inet IP address fromt the eth0 section?? -- PHP General M

[PHP] Socket functions

2005-08-29 Thread Philippe Reynolds
Greetings, When I do an ifconfig in unix, I see the the IP address for the my ethernet. It follows something called inet. Would anyone know who to manipulate the socket functions to be able to extract the inet IP address fromt the eth0 section?? Cheers Phil -- PHP General Mailing List (ht

Re: [PHP] Socket server in PHP

2005-06-24 Thread vieonet forums
Hi I suggest to use cron table against php deamon, It'will we be more stable and using less load. regards - Original Message - From: "Richard Lynch" <[EMAIL PROTECTED]> To: "kioto" <[EMAIL PROTECTED]> Cc: "php-general" Sent: Friday,

Re: [PHP] Socket server in PHP

2005-06-23 Thread Richard Lynch
On Wed, June 22, 2005 11:52 pm, kioto said: > Hi all sorry for the ignorance :D.This is my first time with Socket and > i have > a question for you.I want create a script that run like daemon in > background > and listen incoming request.It's possible with socket open a stream to a > directory > an

[PHP] Socket server in PHP

2005-06-22 Thread kioto
Hi all sorry for the ignorance :D.This is my first time with Socket and i have a question for you.I want create a script that run like daemon in background and listen incoming request.It's possible with socket open a stream to a directory and check any change on this directory ? I want send not

Re: [PHP] Socket connection reset by pear

2005-05-06 Thread =?iso-8859-1?q?Mart=EDn_Marqu=E9s?=
OK, I found the error. Aparently, the message that I was sending didn't have a newline at the end, and so socket_read on the other end failed to complete it's task, and finds it self with a conection reset by pear when the client tries to write something else. I found out when looking at the Ne

Re: [PHP] Socket connection reset by pear

2005-05-06 Thread =?iso-8859-1?q?Mart=EDn_Marqu=E9s?=
El Vie 06 May 2005 01:50, Richard Lynch escribió: > On Thu, May 5, 2005 5:20 am, Martín Marqués said: > > I'm trying to build some communication aside of the server thin client > > stuff, > > with a socket daemon and a socket client. > > > > The daemon is the same that everybody can find in the PHP

Re: [PHP] Socket connection reset by pear

2005-05-05 Thread Richard Lynch
On Thu, May 5, 2005 5:20 am, Martín Marqués said: > I'm trying to build some communication aside of the server thin client > stuff, > with a socket daemon and a socket client. > > The daemon is the same that everybody can find in the PHP docs (example > 1). > The client simply opens a connection to

[PHP] Socket connection reset by pear

2005-05-05 Thread =?iso-8859-1?q?Mart=EDn_Marqu=E9s?=
I'm trying to build some communication aside of the server thin client stuff, with a socket daemon and a socket client. The daemon is the same that everybody can find in the PHP docs (example 1). The client simply opens a connection to the daemon and writes data using the socket Object from PEA

Re: [PHP] How to make a PHP Socket client crash-proof?

2004-12-10 Thread René Fournier
I managed to solve the problem with the socket client hanging when the Server "disappears". Actually, it is not hanging. What I discovered is that once the other end of the connection drops, it starts/continues reading on that socket ad infinitum. (I put a little counter in it, and can watch it

Re: [PHP] How to make a PHP Socket client crash-proof?

2004-12-09 Thread Richard Lynch
Have you completely eliminated the possiblity of having a second, independent, completely unrelated client/socket which is used to *SEND* data to the server? client_get <-- server client_send ---> server They can both use your local database to share data, to whatever degree you deem nece

[PHP] How to make a PHP Socket client crash-proof?

2004-12-08 Thread René Fournier
Hi all, I have a Socket Client that connects to a Server. (It is not multi-socket or multi-anything.) It is VERY simple. How it works: 0. CLIENT connects to SERVER. 1. CLIENT waits for incoming data. 2. If there is no data for a while, CLIENT sends a "ping" to the SERVER. 3. If the SERVER respon

Re: [PHP] Socket trouble

2004-10-28 Thread bbonkosk
ctober 28, 2004 1:04 pm Subject: [PHP] Socket trouble > I'm having some trouble with my socket client. I would like it to > "notice" when the server is no longer there, and then reconnect. I > have > code for the reconnect, etc., but I can't figure out how to write

[PHP] Socket trouble

2004-10-28 Thread René Fournier
I'm having some trouble with my socket client. I would like it to "notice" when the server is no longer there, and then reconnect. I have code for the reconnect, etc., but I can't figure out how to write the socket_read code so that it "notices" when the server is gone and then responds. Presen

Re: [PHP] Socket Tutorial

2004-07-08 Thread René Fournier
Hi Andrew, This one helped me a lot: http://www.devshed.com/c/a/PHP/Socket-Programming-With-PHP/ This isn't a tutorial, but good sample code for a multi-client chat server: http://dave.dapond.com/socketselect.phps ...Rene On Monday, July 5, 2004, at 12:39 PM, Andrew wrote: Hi guys, Can som

[PHP] Socket Tutorial

2004-07-05 Thread Andrew
Hi guys, Can somebody provide a good PHP Socket Programming tutorial. I'm working on a chat server application. The client is XMLsocket based Flash movie. Thanks, Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Socket w/SSL Issues

2004-05-31 Thread Steve Douville
PHP is installed without openssl here at pair. I want to make a socket call to port 443 on a server and I'm getting an error from fsocketopen() that no ssl support is built in, of course. I thought that using "ssl://" might work around this, but I guess not. Any ideas for me? $host = "my.host.com

[PHP] Socket client can do one thing (loop), but not the other (loop, timeout, loop again)

2004-05-14 Thread René Fournier
Hello everyone, I really appreciate the suggestions so far with my socket client problem. Somebody suggested I repost the issue with the program flow and code, to clarify the situation (a good idea). So here it is: To sumarrize: My socket client runs fine when all it does is (1) wait for data

Re: [PHP] Socket looping challenge

2004-05-13 Thread Curt Zirzow
* Thus wrote Ren Fournier ([EMAIL PROTECTED]): > > MESSAGE RECEIVED > PHP Warning: socket_read() unable to read from socket [35]: Resource > temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on > line 61 This error [35] will occur if the socket isn't ready yet. Its an EAGA

Re[2]: [PHP] Socket looping challenge

2004-05-13 Thread Tom Rogers
Hi, Friday, May 14, 2004, 9:11:21 AM, you wrote: RF> The script doesn't even get that first "while" condition line. It loops RF> a few times (while receiving messages), then when no more messages are RF> coming from the server, and it times-out, it breaks out of the "while", RF> then returns to th

Re: [PHP] Socket looping challenge

2004-05-13 Thread René Fournier
The script doesn't even get that first "while" condition line. It loops a few times (while receiving messages), then when no more messages are coming from the server, and it times-out, it breaks out of the "while", then returns to the top again, where it that while condition returns the error "

Re: [PHP] Socket looping challenge

2004-05-13 Thread Tom Rogers
Hi, Friday, May 14, 2004, 5:21:10 AM, you wrote: RF> Hi all, RF> Still encountering some challenges with my socket loop. Basically, I RF> need this socket client to wait to read incoming data, but if nothing RF> happens for more than three seconds, I want it to do something, then RF> return to wa

[PHP] Socket looping challenge

2004-05-13 Thread René Fournier
Hi all, Still encountering some challenges with my socket loop. Basically, I need this socket client to wait to read incoming data, but if nothing happens for more than three seconds, I want it to do something, then return to waiting (for another three seconds). I've got some good help fro

[PHP] newbies was:Re: [PHP] Socket

2004-05-07 Thread raditha dissanayake
Juan Pablo Herrera wrote: Hi! Please, i need a tutorial about socket. I read php.net but the examples is lost. Regards, Juan Pablo A classic example of not bothering to follow list guide lines. This original message is hijacking the newbie guide thread. -- Raditha Dissanayake. -

Re: [PHP] Socket

2004-05-06 Thread Petr U.
On Fri, 7 May 2004 00:59:03 -0300 (ART) "Juan Pablo Herrera" <[EMAIL PROTECTED]> wrote: > Please, i need a tutorial about socket. I read php.net but the examples is > lost. I think you should check it again ;) http://www.php.net/manual/en/ref.sockets.php -- Petr U. -- PHP General Mailing Li

[PHP] Socket

2004-05-06 Thread Juan Pablo Herrera
Hi! Please, i need a tutorial about socket. I read php.net but the examples is lost. Regards, Juan Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Socket server with multiple connections

2004-04-23 Thread René Fournier
I've gone through a few good socket client and server tutorials (such as http://www.devshed.com/c/a/PHP/Socket-Programming-With-PHP/), and have got the samples working. What I'm trying to do now is write a simple Socket Server that will accept multiple connections, do its thing

RE: [PHP] Socket Server problem

2004-04-15 Thread Jay Blanchard
[snip] PHP Notice: Undefined variable: client in /Users/rene/Sites/test/s9.php on line 30 Here's my code: [/snip] I tried counting the lines, but could not determine which one was line 30. Is this it... if ($client[$i]['sock'] != null) $read[$i+1] = $client[$i]['sock']; If so $client is not

[PHP] Socket Server problem

2004-04-15 Thread René Fournier
I'm working through Ori Staub's excellent Socket Server tutorial (http://www.zend.com/zend/tut/tutorial-staub3.php), but can't get the sample server working. I've read the user comments and fixed a couple things, but still, no dice. Here's the error I receive: [Valhalla:~/Sites/test] rene% /usr

Re: [PHP] Socket client application

2004-04-13 Thread Robert Cummings
find any > tutorials on what such a socket client app might look like. The client > I need to build must maintain the connection once started. > > Any ideas?? > > ...Rene Google: php socket client This one in particular starts off with a server discussion then goes

[PHP] Socket client application

2004-04-13 Thread René Fournier
Hi, I've gone through several good PHP sockets tutorials, but all of them seem to focused on making socket servers. What I actually need to do is write a socket client. There's an app runnning on a distant server that accepts incoming TCP connections at such-and-such an IP address and port, an

Re: [PHP] socket extension documentation ???

2004-03-08 Thread Raditha Dissanayake
http://www.google.com :-) Hemp Cluster wrote: Hy... @ all I'm trying to find a better documentation about socket extension in php as on php.net self. does anyone know an another source for me ??? thx & regards Jointy -- Raditha Dissanayake. -

[PHP] socket extension documentation ???

2004-03-08 Thread Hemp Cluster
Hy... @ all I'm trying to find a better documentation about socket extension in php as on php.net self. does anyone know an another source for me ??? thx & regards Jointy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   >