Name | Modified | Size | Downloads / Week |
---|---|---|---|
XMessages-v1.1.zip | 2012-04-06 | 13.5 kB | |
README | 2012-04-06 | 1.4 kB | |
LICENCE | 2011-03-06 | 31.8 kB | |
Totals: 3 Items | 46.8 kB | 1 |
PHP X-Messages v1.1 Copyright (c) 2011-2012 James Watts (SOLFENIX) http://www.solfenix.com This is FREE software, licensed under the GNU/GPL http://www.gnu.org/licenses/gpl.html This software implements the X-Messages specification http://www.xmessages.org The XMessages class for PHP 5.3+ lets you easily integrate the X-Messages spec into existing PHP web applications for simple server-client messaging. To use the package it's highly recommended to use a PSR-0 compatible autoloader for required classes. You can find a fully compatible autoloader here: https://sourceforge.net/p/php-autoload Once you've unpacked the files into your include path the package is ready for use. Remember, HTTP headers cannot be sent to the client once output has been sent. To avoid PHP throwing an error, turn on your output buffer and collect the content generated by your code. Once your code has finished, send the X-Messages header, then the content generated as the body of the response, for example: ob_start(); // turn on output buffering // your code here (which also genrates some messages) $output = ob_get_contents(); // collect your generated content ob_end_clean(); // stop and clear the buffer // send some other headers if required XMessages::send(); // send the X-Messages header echo $output; // send your output See http://www.xmessages.org for more information.