Fog Creek Software
Discussion Board




Dispatcho improvements (UNIX)

In dispatchod.php / dispatcho.php, you manually hex encode / decode the mail message. This is actually very resource intensive if the message is a couple of MBytes.

I suggest you replace BlobFromString() with the PHP built-in function bin2hex().

And a more efficient counter-part:

function hex2bin($data)
{
  $len = strlen($data);
  return pack("H" . $len, $data);
}

Daniel Gehriger
Wednesday, January 21, 2004

Thanks!

Michael H. Pryor (fogcreek)
Wednesday, January 21, 2004

I'm adding this in now.. works beautifully.

mhp
Thursday, January 22, 2004

*  Recent Topics

*  Fog Creek Home