Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/hessianphp/htdocs/pmwiki.php on line 242

Warning: Cannot modify header information - headers already sent by (output started at /home/project-web/hessianphp/htdocs/pmwiki.php:242) in /home/project-web/hessianphp/htdocs/pmwiki.php on line 727
HessianPHP | UserGuide / BinaryData
Recent Changes - Search:

Documents

Community

Related Projects

Powered by PmWiki

BinaryData

Hessian is a binary protocol and with it you can send and receive binary data in an easy way. In the current implementation, a resource variable that comes from a fopen() call will get sent as a binary stream. The only condition is that the file pointer is valid and is located at the start of the file. Here is an example taken from the standard tests of the distribution:

function viewKitty(){
  $handle = fopen('Kitty_sniper.jpg', 'rb');
  $fileinfo = array('mime_type' => 'image/jpeg', 'image' => $handle);
  return $fileinfo;
}

The method returns an array with a string with the mime type of the file and a file pointer to the file itself. Internally, HessianPHP will open the file for reading and will send it's contents in chunks. Make sure you a look at the fileService.php and imageloader.php files for more information.

TODO: More examples of this


Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/project-web/hessianphp/htdocs/pmwiki.php(461) : regexp code on line 1
Edit - History - Print - Recent Changes - Search
Page last modified on December 31, 2005, at 06:11 AM

Warning: fopen(wiki.d/.flock): failed to open stream: Permission denied in /home/project-web/hessianphp/htdocs/pmwiki.php on line 355

PmWiki can't process your request

Cannot acquire lockfile

We are sorry for any inconvenience.