generate(); $captcha = ['captchaId' => $captchalib->getId(), 'captchaImgPath' => $captchalib->getPath()]; echo json_encode($captcha);