Long-lived connections (asynchronous server push) with Apache/PHP/Javascript?

10,031

You can use Comet programming techniques in PHP. I think a good place to start is this post, describing how to implement Comet in PHP.

Share:
10,031
Lordn__n
Author by

Lordn__n

I am a software developer from Perth, Western Australia (now living in New York City) with roughly 13 years experience in developing end-to-end solutions in Java, C#, C, C++, Perl, PHP and HTML/CSS/Javascript. I have experience in developing user interfaces (Web and desktop), database design and development (Oracle, SQL Server, MySQL), data modelling, software design, data conversion, Web application development and high-performance high-availability computing. I work for Google in New York City. I have a blog I call C for Coding. Come check it out!

Updated on June 22, 2022

Comments

  • Lordn__n
    Lordn__n almost 2 years

    I come from more of a Java background. In the last year or two, it's become somewhat popular to do server push over HTTP using long-lived HTTP connections in Comet. It's an extremely useful technique.

    So I'm curious what the equivalent is with Apache + PHP + Javascript? One option I see is just using straight AJAX calls (eg with jQuery) but I don't really know how Apache handles them or how I can implement such a thing on the serverside with PHP. Any ideas? Any good resources on this kind of thing?