[PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread chetan rane

HI all

I have a small issue to be handled here

i want to persistently moniter the HTTP stream from a Client Browser. How do
i accomplish it

--
Have A plesant Day
Chetan. D. Rane
Location: Pune , India
Contact: +91-9890792762
otherID: [EMAIL PROTECTED]
[EMAIL PROTECTED]


Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread Stut

chetan rane wrote:

I have a small issue to be handled here

i want to persistently moniter the HTTP stream from a Client Browser. 
How do

i accomplish it


I'm not sure what you mean by 'persistently monitor'. If you mean listen 
for incoming connections then you need to look at the socket or stream 
functions. If that is the case then I don't see where the Client 
Browser comes into it.


Please elaborate further on what you are actually trying to accomplish.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread chetan rane

hi

what i mean is

i want to write a script
where , when ny client requests come i read the stream and then process it

here is the exact steps

when the user first initiates
i create a session and establish a TCP connection
second: when teh user next sends a request i dont create a new TCP
connection but use the existing TCP connection.

On 2/4/07, Stut [EMAIL PROTECTED] wrote:


chetan rane wrote:
 I have a small issue to be handled here

 i want to persistently moniter the HTTP stream from a Client Browser.
 How do
 i accomplish it

I'm not sure what you mean by 'persistently monitor'. If you mean listen
for incoming connections then you need to look at the socket or stream
functions. If that is the case then I don't see where the Client
Browser comes into it.

Please elaborate further on what you are actually trying to accomplish.

-Stut





--
Have A plesant Day
Chetan. D. Rane
Location: Pune , India
Contact: +91-9890792762
otherID: [EMAIL PROTECTED]
[EMAIL PROTECTED]


Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread Stut

chetan rane wrote:

i want to write a script
where , when ny client requests come i read the stream and then process it

here is the exact steps

when the user first initiates
i create a session and establish a TCP connection
second: when teh user next sends a request i dont create a new TCP 
connection but use the existing TCP connection.


Ok, couple of questions...

1) Why?
2) Why?

What is making these connections from the client side?

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread Jiffy Slides Leonard Burton

XAJAX or another AJAX library, perhaps?

On 2/4/07, Stut [EMAIL PROTECTED] wrote:

chetan rane wrote:
 i want to write a script
 where , when ny client requests come i read the stream and then process it

 here is the exact steps

 when the user first initiates
 i create a session and establish a TCP connection
 second: when teh user next sends a request i dont create a new TCP
 connection but use the existing TCP connection.

Ok, couple of questions...

1) Why?
2) Why?

What is making these connections from the client side?

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread Stut

Jiffy Slides Leonard Burton wrote:

XAJAX or another AJAX library, perhaps?


Sorry, I missed a question.

3) Why do you need to use the same TCP connection?

-Stut


On 2/4/07, Stut [EMAIL PROTECTED] wrote:

chetan rane wrote:
 i want to write a script
 where , when ny client requests come i read the stream and then 
process it


 here is the exact steps

 when the user first initiates
 i create a session and establish a TCP connection
 second: when teh user next sends a request i dont create a new TCP
 connection but use the existing TCP connection.

Ok, couple of questions...

1) Why?
2) Why?

What is making these connections from the client side?

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread chetan rane

same TCP creation,

because i i am bindiing that stream to the Server.

i am actually creating a component.

a component which resides in between a client and server

i accept HTTP requests from a client and relay the same uysing a TCP
connection to the SERVER.
and vice versa

i think this makes it clear.

On 2/4/07, Stut [EMAIL PROTECTED] wrote:


chetan rane wrote:
 i want to write a script
 where , when ny client requests come i read the stream and then process
it

 here is the exact steps

 when the user first initiates
 i create a session and establish a TCP connection
 second: when teh user next sends a request i dont create a new TCP
 connection but use the existing TCP connection.

Ok, couple of questions...

1) Why?
2) Why?

What is making these connections from the client side?

-Stut





--
Have A plesant Day
Chetan. D. Rane
Location: Pune , India
Contact: +91-9890792762
otherID: [EMAIL PROTECTED]
[EMAIL PROTECTED]


Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread Stut

chetan rane wrote:

same TCP creation,

because i i am bindiing that stream to the Server.

i am actually creating a component.

a component which resides in between a client and server

i accept HTTP requests from a client and relay the same uysing a TCP 
connection to the SERVER.

and vice versa

i think this makes it clear.


OK, so you're basically making a server app. I suggest you start here: 
http://php.net/stream-socket-server


-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread Myron Turner

chetan rane wrote:

same TCP creation,

because i i am bindiing that stream to the Server.

i am actually creating a component.

a component which resides in between a client and server

i accept HTTP requests from a client and relay the same uysing a TCP
connection to the SERVER.
and vice versa

i think this makes it clear.
I think what you want to look for is how to write a socket server.  
You'll find a lot about this via google.  A socket server lets you  
open  up a persistent port for listening with a process that runs 
continually in the background and then allows you to spawn off multiple 
sockets as they come in, like a web server or ftp or ssh.  My guess is 
that there's a fair amount of complexity here that you'll have to 
investigate.  For instance, you'll have to preempt port 80, the standard 
port on which httpd listens, forward the http request to your web server 
on a local port, retrieve the response and pass it back to the client.  
And presumably you'll have to be doing this for multiple clients.
I think someone on this list suggested using AJAX.  That would be much 
simpler.  If you had to have data persistence, for instance, you could 
store data in temporary files on the server or in temporary database 
entries, or you could simply pass data back and forth using POST.  The 
script which handles the AJAX requests would be the component that 
resides on the server.



_
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread Myron Turner

chetan rane wrote:

same TCP creation,

because i i am bindiing that stream to the Server.

i am actually creating a component.

a component which resides in between a client and server

i accept HTTP requests from a client and relay the same uysing a TCP
connection to the SERVER.
and vice versa

i think this makes it clear.

On 2/4/07, Stut [EMAIL PROTECTED] wrote:


chetan rane wrote:
 i want to write a script
 where , when ny client requests come i read the stream and then process
it

 here is the exact steps

 when the user first initiates
 i create a session and establish a TCP connection
 second: when teh user next sends a request i dont create a new TCP
 connection but use the existing TCP connection.

Ok, couple of questions...

1) Why?
2) Why?

What is making these connections from the client side?

-Stut






As a follow-up to my previous, try this:
   http://www.devshed.com/c/a/PHP/Socket-Programming-With-PHP/

It needs IE (as opposed to Firefox).

--

_
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php