PHP Classes

function could be much faster

Recommend this page to a friend!

      IMAP  >  All threads  >  function could be much faster  >  (Un) Subscribe thread alerts  
Subject:function could be much faster
Summary:Slow receive of messages with big attachments.
Messages:3
Author:Konstantin Sokolov
Date:2011-07-18 09:15:01
Update:2012-03-30 07:47:52
 

  1. function could be much faster   Reply   Report abuse  
Picture of Konstantin Sokolov Konstantin Sokolov - 2011-07-18 09:15:02

////This functiuon is to retrive the full response message from server
function get_server_responce()
{
while(1)
{
//$response.="\r\n".$this->get_line();
$ln=$this->get_line();
$response.="\r\n".$ln;

//if(substr($response,strpos($response,$this->tag),strlen($this->tag))==$this->tag)
if(substr($ln,strpos($ln,$this->tag),strlen($this->tag))==$this->tag)
break;
}
return $response;
}

  2. Re: function could be much faster   Reply   Report abuse  
Picture of Arie Arie - 2011-12-05 20:25:04 - In reply to message 1 from Konstantin Sokolov
Thanks! before it was exceeding the 30 seconds timeout, now it only takes 1 second.

  3. Re: function could be much faster   Reply   Report abuse  
Picture of Anders Jenbo Anders Jenbo - 2012-03-30 07:47:52 - In reply to message 1 from Konstantin Sokolov
I have rewritten this class as the original author seams uninterested in updating his, i belive my class to be a lot faster then the old one, please take a look and feel free to give any feed back.
You can find my version here:
github.com/AJenbo/PHP-imap