Platinum Partner

Enabling Zip Compression With PHP

// if you want to reduce the bandwidth bill and increase page load time for long pages - this PHP snippet will turn on gzip compression for those that support it.


function compress_handler($in_output)
{
  return gzencode($in_output);
}
if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip') !== FALSE)
{
  ob_start('compress_handler');
  header('Content-Encoding: gzip');
}
else
{
  ob_start();
}
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}