I have connected to Ali Yun"s SMS message. How can I limit the number of times each phone receives CAPTCHA per day?
I have connected to Ali Yun"s SMS message. How can I limit the number of times each phone receives CAPTCHA per day?
SMS query API (QuerySendDetails)-PHP
check how many SMS messages have been accepted on the date corresponding to the change of mobile phone number
memcached/redis/ databases can do this
construct a key, based on the mobile phone number, such as Mobile number-send- Today
is written in redis
it is recommended to use redis to record the logs sent every day, and count the number of times each mobile number sends verification per day. Do not send more times than the limit. Remember to clean this part of the log regularly.
of course you can do it using mysql, but redis is much faster.
use caching, redis as an example, before sending, for example, you want to limit the number of times you send per day,
if you want to be complicated, for example:
when registering, you can only send SMS verification code once per second. Logic
Previous: How to click the button to save the picture on the mobile terminal
Next: Vue v-for double nesting, delete the Div, of the child loop and retain the Div? of the parent loop