Overview

Namespaces

  • None
  • sinacloud
    • sae

Classes

  • SaeADPNS
  • SaeAPNS
  • SaeChannel
  • SaeDeferredJob
  • SaeFetchInternal
  • SaeKV
  • SaeMail
  • SaeMysql
  • SaeSegment
  • SaeTAdvance
  • SaeTaskQueue
  • SaeTClientV2
  • SaeTOAuthV2
  • SaeVCode
  • vDisk

Exceptions

  • OAuthException
  • Overview
  • Namespace
  • Class

Class SaeVCode

SAE 验证码服务

<?php
session_start();
$vcode = new SaeVCode();
if ($vcode === false)
        var_dump($vcode->errno(), $vcode->errmsg());

$_SESSION['vcode'] = $vcode->answer();
$question=$vcode->question();
echo $question['img_html'];

?>

错误码参考: - errno: 0 成功 - errno: 3 参数错误 - errno: 500 服务内部错误 - errno: 999 未知错误 - errno: 403 权限不足或超出配额

SaeObject
Extended by SaeVCode
Package: sae
Author: Elmer Zhang
Located at saevcode.class.php
Methods summary
public
# __construct( $options = array() )
public array
# question( )

取得验证码问题

取得验证码问题

图片验证码返回格式: array("img_url"=>"验证码图片URL", "img_html"=>"用于显示验证码图片的HTML代码")

Returns

array

Author

Elmer Zhang
public string
# answer( )

取得验证码答案

取得验证码答案

Returns

string

Author

Elmer Zhang
public integer
# errno( )

取得错误码

取得错误码

Returns

integer

Author

Elmer Zhang
public string
# errmsg( )

取得错误信息

取得错误信息

Returns

string

Author

Elmer Zhang
API documentation generated by ApiGen