public function sendCaptcha($phone, $sendLock = false)
{
$this->phone = $phone;
/* # 前置检查必要信息 */
if (!$this->allBefore()) {
return false;
/* # 检查锁 */
} elseif ($sendLock and $this->lock()) {
return false;
}
$this->buildParam();
$this->InLock();
$debug = false;
if (isset($_REQUEST['client_debuging'])) {
$this->setMessage($this->getCode());
$debug = true;
$result = false;
}
if ($debug || ($result = $this->send())) {
$this->add(array('phone' => $this->phone, 'code' => $this->code, 'time' => time()));
}
return $result;
}