From: Brion Vibber Date: Tue, 20 Feb 2007 08:30:14 +0000 (+0000) Subject: use wfStreamFile() to output the captcha image; it takes care of removing the extra... X-Git-Url: https://git.toastfreeware.priv.at/toast/cookiecaptcha.git/commitdiff_plain/c89580f8f4180139a280e427889a0cf3da28a1c2?hp=985ccb6608a600b83bc385289e5ba73eef790404 use wfStreamFile() to output the captcha image; it takes care of removing the extra gzip compression and crap --- diff --git a/FancyCaptcha.php b/FancyCaptcha.php index 21931a8..63273a9 100644 --- a/FancyCaptcha.php +++ b/FancyCaptcha.php @@ -216,8 +216,9 @@ class FancyCaptcha extends SimpleCaptcha { $file = $this->imagePath( $salt, $hash ); if( file_exists( $file ) ) { - header( 'Content-type: image/png' ); - readfile( $file ); + global $IP; + require_once "$IP/includes/StreamFile.php"; + wfStreamFile( $file ); return true; } }