Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "config.php";
- $mobile = $_POST['mobile'];
- $p_id=$_POST['id'];
- $cmpny=$_POST['cmpny'];
- $name=$_POST['name'];
- $cmob=$_POST['cmob'];
- $cat=$_POST['cat'];
- date_default_timezone_set('Asia/Kolkata');
- $date=date('Y-m-d H:i:s');
- $password = rand(0000,9999);
- $username = 'support@otomarket.in';
- $hash = '2bfc32d420f59873929523bf5488b602c96057e6';
- // Message details
- $numbers = "$mobile";
- $sender = urlencode('OTOMKT');
- $message = rawurlencode("Hello,
- Your OTP is - ".$password."
- Thank you for your enquery.
- OTOMarket.in");
- $numbers = $numbers;
- // Prepare data for POST request
- $data = array('username' => $username, 'hash' => $hash, 'numbers' => $numbers, "sender" => $sender, "message" => $message);
- // Send the POST request with cURL
- $ch = curl_init('http://api.textlocal.in/send/');
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $response = curl_exec($ch);
- curl_close($ch);
- // Process your response here
- //echo $response;
- $l=1;
- $sql="insert save_mobile(p_id,mobile,date,request_limit,otp) values('$p_id','$mobile','$date','$l','$password')";
- $result=$mysqli->query($sql);
- header("location:details.php?id=$p_id&r=$numbers&p_id=$p_id");
- //}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement