You are here

function boost_stats_async_image in Boost 6

1 call to boost_stats_async_image()
boost_stats.php in stats/boost_stats.php
Place in webroot, for faster stats if needed.

File

stats/boost_stats.php, line 59
Place in webroot, for faster stats if needed.

Code

function boost_stats_async_image() {

  // Script should take under 1MB of memory to work.
  // Prime php for background operations
  while (ob_get_level()) {
    ob_end_clean();
  }
  header("Connection: close");
  ignore_user_abort();

  // Output of 1 pixel transparent gif
  ob_start();
  header("Content-type: image/gif");
  header("Expires: Wed, 11 Nov 1998 11:11:11 GMT");
  header("Cache-Control: no-cache");
  header("Cache-Control: must-revalidate");
  header("Content-Length: 43");
  header("Connection: close");
  printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", 71, 73, 70, 56, 57, 97, 1, 0, 1, 0, 128, 255, 0, 192, 192, 192, 0, 0, 0, 33, 249, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 68, 1, 0, 59);
  ob_end_flush();
  flush();

  // Image returned and connection closed.
  // Do background processing. Time taken below should not effect page load times.
}