0){ $userinfo=mysqli_fetch_array($getuserinfo); $name=$userinfo['name']; $mobile=$userinfo['mobile']; } $msg="Dear $name, Your produce of $product is going for shorting & grading, Please open our MKC APP for live video.Thank You."; $data = array("api_id" => "API272124593080", "api_password" => "12345678","sms_type" => "T","encoding" => "T","sender_id" => "MKCGZB","phonenumber" => $mobile,"textmessage" => $msg); $data_string = json_encode($data); $ch = curl_init('api.bulksmsplans.com/api/SendSMS'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); //echo $result ; curl_close($ch); $savemsg=mysqli_query($link,"insert into tbl_notifi (user_id,msg) values('$uid','$msg')"); //echo $url; header("location:all_bilty.php"); } ?>