在我的网站上实施短信验证 [英] Implement sms verification on my website

查看:98
本文介绍了在我的网站上实施短信验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我在网站上设置短信验证。我需要一个示例项目,我可以在其中进行更改和使用?有什么帮助吗?



我尝试了什么:



php工作代码,并尝试在php中实现服务器端代码,这是成功但现在我很困惑创建客户端

please help me to set up sms verification on my website. i need a sample project in which i can make changes and use? any help?

What I have tried:

php working code, and also tried implementing the server side code in php, which was successful but now i a m confused to create the client side

推荐答案

只需将新表添加到数据库中存储密钥。如果您不想添加新表,则可能需要创建新列。在该列中,您应该存储将要发送的密钥以用于验证目的。



然后将密钥发送到他们的电话号码。您需要使用网关服务通过短信将消息发送到他们的手机。您可以使用Twilio等服务。 PHP只会用来使事情有效。



现在,如果您已完成我之前告诉您的事情(前2段),那么您只需要询问他们的电话号码,然后向他们发送验证码。验证就像验证一样。您将测试他们的电话号码和验证码,如果代码是当前的电话号码,那么您将验证他们的帐户流程。



一个好的例如: Build使用Twilio,PHP,MySQL和jQuery进行简单的电话验证 [ ^ ]
Just add a new table to the database to store the key. You may want to create a new column if you don't want to add a new table. In that column, you should store the key that is going to be sent for the verification purposes.

Then send the key to their phone numbers. You would need to use a gateway service to send the messages through SMS to their mobile phone. You can use services like Twilio or so on. PHP would just be used to make things work.

Now if you have done what I told you previously (in previous 2 paragraphs) then you are just going to ask them for their phone numbers and then send them a verification code. Verification is just like authentication. You are going to test their phone number and verification code, if the code is for the current phone number, then you are going to verify their account process.

A good example is: Build a Simple Phone Verification with Twilio, PHP, MySQL, and jQuery[^]


这篇关于在我的网站上实施短信验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆