$filedata = base64_decode('R0lGODlhAQABAIAAAMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='); $filesize = strlen($filedata); // browser will think there is no more data if content-length is what is returned // regardless of how long the script continues to execute, apart from IIS + CGI header('Content-type: image/gif'); if (!(strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false and strpos(SAPI_NAME, 'cgi') !== false)) { header('Content-Length: ' . $filesize); header('Connection: Close'); } if (!$vbulletin->options['crontab']) { echo $filedata; flush(); } ($hook = vBulletinHook::fetch_hook('cron_start')) ? eval($hook) : false; if (!defined('NOSHUTDOWNFUNC') and !$vbulletin->options['crontab']) { vB_Shutdown::add('exec_cron'); } else { $cronid = NULL; if ($vbulletin->options['crontab'] and SAPI_NAME == 'cli') { $cronid = intval($_SERVER['argv'][1]); // if its a negative number or 0 set it to NULL so it just grabs the next task if ($cronid < 1) { $cronid = NULL; } } exec_cron($cronid); if (defined('NOSHUTDOWNFUNC')) { $db->close(); } } /*======================================================================*\