$authKey, 'mobiles' => $mobileNumber, 'message' => $message, 'sender' => $senderId, 'route' => $route, 'country'=>$country ); /* API URL */ //$url="https://control.msg91.com/api/sendhttp.php"; $url="http://login.wishbysms.com/api/sendhttp.php?authkey=".$postData['authkey']."&mobiles=91".$mobileNumber."&message=".$postData['message']."&sender=".$postData['sender']."&route=".$postData['route']."&country=".$postData['country']; echo $url; /* init the resource */ $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $postData /*,CURLOPT_FOLLOWLOCATION => true */ )); /* Ignore SSL certificate verification */ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); /* get response */ $output = curl_exec($ch); /* Print error if any */ if(curl_errno($ch)) { echo 'error:' . curl_error($ch); } curl_close($ch); echo $output; //header( "Location: success.php" ); } else { echo "Error: " . $sql . "
" . mysqli_error($conn); } mysqli_close($conn); return true; } else { echo "failure"; return false; } ?>