I am integrating sms api with my form but when I submit the I get like this sms: MOBILE-NUMBERmessage. (+10000000000this is my message)
But I want space between MOBILE-NUMBER and message. Like; (+100000000 message.
I too much try but it will done something error or not working…
What I do ?
PHP
<?php
$mobileNumber = "0000000000";
if(isset($_POST['submit']))
{
$message = $_POST['textbox1'] . \n $_POST['textbox2'];
$authKey = "abcdefghijklmnopqrstuvwxyz";
$senderId = "ABCDEF";
$route = "4";
$postData = array(
'authkey' => $authKey,
'mobiles' => $mobileNumber,
'message' => $message,
'sender' => $senderId,
'route' => $route,
'country'=>'0'
);
$url="https://website.com/api/sendhttp.php";
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $postData
));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$output = curl_exec($ch);
if(curl_errno($ch))
{
echo 'error:' . curl_error($ch);
}
curl_close($ch);
echo '
<h3>Success!</h3>
<p>Red often indicates a dangerous or negative situation.</p>';
}
?>
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head><body><input type="tel" name="mobile" value="0000000000"/><br><input type text="text"name="message" /><br><input type="submit" name="submit" value="submit"/></body></html>
I would appreciate.please help and tell me how I mention after MOBILE-NUMBER.
** This is message)
I too much try but it will done something error or not working…
What I do ?
PHP
<?php
$mobileNumber = "0000000000";
if(isset($_POST['submit']))
{
$message = $_POST['mobile'] . \n $_POST['message'];
$authKey = "abcdefghijklmnopqrstuvwxyz";
$senderId = "ABCDEF";
$route = "4";
$postData = array(
'authkey' => $authKey,
'mobiles' => $mobileNumber,
'message' => $message,
'sender' => $senderId,
'route' => $route,
'country'=>'0'
);
$url="https://website.com/api/sendhttp.php";
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $postData
));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$output = curl_exec($ch);
if(curl_errno($ch))
{
echo 'error:' . curl_error($ch);
}
curl_close($ch);
echo '
<h3>Success!</h3>
<p>Red often indicates a dangerous or negative situation.</p>';
}
?>
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head><body><input type="tel" name="mobile" value="0000000000"/><br><input type text="text"name="message" /><br><input type="submit" name="submit" value="submit"/></body></html>
I would appreciate.please help and tell me how I mention after MOBILE-NUMBER.