IOS mobile phone verification code-php Tutorial

Source: Internet
Author: User
IOS mobile phone verification code has recently been developed for an ios app project.
After the mobile phone end enters the user's mobile phone number, it calls the backend verification code Sender program. The backend php sends a verification code text message to the user's mobile phone,
Excuse me:
How do I set the SMS verification code validity period (120 s )? Use session_start? Session_start is not supported and the output data is empty.
Or where did I make a mistake? the webpage debugging session records the information.
Please help. Thank you.


Reply to discussion (solution)

1. use redis expire to set 120 s
2. submit the verification code to the background mobile phone number and verification code at the same time without session storage verification code

It can be stored in the database and then called for processing.

It can be stored in the database and then called for processing.



Thank you very much. we have already done this. we use the database storage method.


1. use redis expire to set 120 s
2. submit the verification code to the background mobile phone number and verification code at the same time without session storage verification code

Redis is not familiar with it, so it is only available for database storage.


Thank you very much.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.