-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathotp.php
35 lines (27 loc) · 1.21 KB
/
otp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
$mobile = trim($_POST['mob']);
$otp = mt_rand(10,1000000);
$mob = '+91'.$mobile;
// Require the bundled autoload file - the path may need to change
// based on where you downloaded and unzipped the SDK
require __DIR__ . '/Twilio/autoload.php';
// Use the REST API Client to make requests to the Twilio REST API
use Twilio\Rest\Client;
// Your Account SID and Auth Token from twilio.com/console
$sid = 'AC1fe6f37c30d11563265566dec51b7ee0';
$token = '40c60a291d885c14cf062f5d090ef8b2';
$client = new Client($sid, $token);
// echo $customerNumer = '+91'.$customerNumerile;
// Use the client to do fun stuff like send text messages!
$client->messages->create(
// the number you'd like to send the message to
$mob,
array(
// A Twilio phone number you purchased at twilio.com/console
'from' => '+16087360686',
// the body of the text message you'd like to send
'body' => "from Hesta bidding your OTP number is $otp please do not share to others."
)
);
header('location:register.php');
?>