Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-12-2013, 05:39 AM   PM User | #1
shanil
New Coder

 
Join Date: Mar 2011
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
shanil has a little shameless behaviour in the past
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.
shanil is offline   Reply With Quote
Old 02-12-2013, 06:30 AM   PM User | #2
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,860
Thanks: 9
Thanked 290 Times in 286 Posts
Dormilich is on a distinguished road
same answer as in http://bytes.com/topic/php/answers/9...port-php-5-3-a
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Old 02-12-2013, 04:18 PM   PM User | #3
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,496
Thanks: 44
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
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.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 02-12-2013, 05:43 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Tags
meta

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:01 PM.


Advertisement
Log in to turn off these ads.