以PHP为例,提交短信验证码的生成方式:
$time = time();
$password = md5($account.$apikey.$mobile.$content.$time);
例如:
APIID: test
APIKEY:1q784322ba1d9bb88d50cf5cdfd89k7d
手机号:138xxxxxxxx
内容:您的验证码是:2546。请不要把验证码泄露给其他人。
time:1451544941
结果:$password=md5("test1q784322ba1d9bb88d50cf5cdfd89k7d138xxxxxxxx 您的 验证码是:2546。请不要把验证码泄露给其他人。1451544941");
注意:因为短信内容会包含中文,所以字符编码统一为 UTF-8
查询剩余条数的生成方式:
$time = time();
$password = md5($account.$apikey.$time);
例如:
APIID: test
APIKEY:1q784322ba1d9bb88d50cf5cdfd89k7d
手机号:138xxxxxxxx
time:1451544941
结果:$password=md5("test1q784322ba1d9bb88d50cf5cdfd89k7d1451544941");
Unix时间戳参考地址:http://tool.chinaz.com/Tools/unixtime.aspx
国内专业互联网团队
21年行业经验
7x24小时售后支持
丰富的行业经验
Copyright © 2004-2025 上海思锐信息技术有限公司 All rights reserved. 沪ICP备07035915号-15 电信增值业务许可证:B2-20160082
服务热线:
4008 808 898
服务热线(工作时间):
4008 808 898
业务咨询(非工作时间):
售后咨询(非工作时间):