This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Ignore errors | |
libxml_use_internal_errors(true) AND libxml_clear_errors(); | |
// http://stackoverflow.com/q/10237238/99923 | |
// http://stackoverflow.com/q/12034235/99923 | |
// http://stackoverflow.com/q/8218230/99923 | |
// original input (unknown encoding) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ob_start(); // collect all outputs in a buffer | |
/* | |
put the normal PHP-Code here | |
if the resulting html code ($sContent) is the same, and so the md5 hash is the same, | |
it will not be sent so the client once more | |
because the client already has this html page in the cache, identified by the md5 hash Etag | |
*/ | |
$sContent = ob_get_contents(); // collect all outputs in a variable | |
ob_clean(); |