System: Windows NT WINDOWS18 10.0 build 17763 (Windows Server 2016) AMD64 | User: IWPD_3544(appclien)
Path: D:\Inetpub\vhosts\appclients.in\fruits-vegitables.nmvm.org
[Back to List]
<?php
include 'admin/config.php';
if(isset($_POST["mobileNo"]) && !empty($_POST["mobileNo"])){
$mobileno=$_POST['mobileNo'];
$otp=date('shi');
//code for mobile OTP
$api_key = '463EE1934C30D4';
$contacts = $mobileno;
$from = 'EKOENT';
$sms_text = urlencode('your OTP For Registration as member in Ekom is '.$otp.' - Ekom');
//Submit to server
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, "http://textsms.co.in/app/smsapi/index.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "key=".$api_key."&entity=1001391820318161644&tempid=1007959617311196962&routeid=6&type=text&contacts=".$contacts."&senderid=".$from."&msg=".$sms_text);
$response = curl_exec($ch);
curl_close($ch);
//end otp code
$_SESSION["otpCandidate"]=$mobileno;
$sql_qry=mysqli_query($con,"insert into otp_tbl set otp='$otp',sess_id='$_SESSION[otpCandidate]'");
echo 1;
}
?>