Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2011
    Thanked 0 Times in 0 Posts

    Push email support in php 5.3

    Hi All,

    Is push email is supported in php 5.3 ? If anyone knows please reply and also give an example.

    Thanks in advance.

  2. #2
    Master Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Behind the Wall
    Thanked 569 Times in 562 Posts
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  3. #3
    Master Coder
    Join Date
    Feb 2011
    Your Monitor
    Thanked 617 Times in 603 Posts
    Any server that pushes something to its client needs a constant connection. Then its down to the protocol being used. If its just regular pop then the client will poll on a regular basis.

    AFAIK, there isn't a 'push email' type of protocol.

    How php 5.3 will support this is a vague question. If you're running a php pop daemon, then it would be down to your own code to support this. PHP doesn't generally act as a server in its own right (although it has the ability via your own code) so unless PHP is planning to offer this as a class or library I don't really think it's going to be a new feature.

  4. #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,668 Times in 2,637 Posts
    As mentioned, PHP *can* and always has had the ability to do this (for sure since 4, can't remember what <= 3 provided for socketing, but that's a pretty trivial fundamental of a web based language I'd say). That would be writing a simple socket app. The real question would be why bother? There are many many other languages far more suited to this job than PHP is (even perl comes to mind here).

    So short answer, sure PHP has always been able to do this, but that doesn't really make it a great idea. You wouldn't run this in a web environment either, rather you would simply set up listeners on the pop and imap sockets. Mail comes in, PHP would do something with it, and away you go.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts