$c = new easy_ captcha(); $expired = !$c->is_valid(); if ($ expired) {$type = "image/png"; ...
www.freecode.com