How to Send Text Messages SMS Gateway – PHP SMS API

How to Send Text Messages SMS Gateway – PHP SMS API

In this Post We Will Explain About is How to Send Text Messages SMS Gateway – PHP SMS API With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Beginners SMS API PHP tutorial: How to create a new SMS web app Example

In this post we will show you Best way to implement Send SMS With PHP Code – PHP, hear for Step-by-step PHP tutorial – Create your new SMS web app using Infobip SMS API with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Read Also:  create more than one new company for Frontaccounting

How to integrate SMS In PHP form

Here, In this Example, we have simple two files created for integrate SMS using PHP form like as a source code below

  • index.php
  • do_submit.php

index.php


<title>Form</title>

<form action="do_submit.php" method="post">
	Your Name:<br><br>
	Your Email:<br><br>
	Your Phone:<br><br>
	<button type="submit" name="btn- save">User Submit</button>
</form>


do_submit.php

 $authKey,
'mobiles' => $contactno,
'message' => $message,
'sender' => $senderId,
'route' => $route
);

$url="http://sms.com/api/sendhttp.php";


$my_ch = curl_init();
curl_setopt_array($my_ch, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $postData
//,CURLOPT_FOLLOWLOCATION => true
));


curl_setopt($my_ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($my_ch, CURLOPT_SSL_VERIFYPEER, 0);

$output = curl_exec($my_ch);
if(curl_errno($my_ch))
{
	echo 'error:' . curl_error($my_ch);
}
curl_close($my_ch);
echo "<pre>";
echo $output;
echo "</pre>";
$url='localhost';
$username='live24';
$password='[email protected]#$dfhhdf';
$conn=mysqli_connect($url,$username,$password,"sms_send");
if(!$conn){
die('Could not Connect My Sql:' .mysql_error());
}
if(isset($_POST['btn-save']))
{
//get all the post method to parameters for input data
$name = $_POST['name'];
$email = $_POST['email'];
$contactno = $_POST['contactno'];

//simple database sql query for all the record inserting data into database
mysqli_query($conn,"insert into employerr (name, email, contactno) values ('$name', '$email', '$contactno')") or die(mysqli_error());
echo 'Thanks a lot for your contact with over Company(www.Pakainfo.com).';
}
?>

How to Send Text Messages SMS Gateway - PHP SMS API steps
How to Send Text Messages SMS Gateway – PHP SMS API steps

You are Most welcome in my youtube Channel Please shubscibe my channel. and give me FeedBack.
More Details……
Angularjs Example

Read Also:  ng-mouseenter Event using Angular Example

Example

I hope you have Got What is how to send sms using php program (full code sample included) And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Files Uploading on Amazon S3 server using Laravel 5.4 Part-1
  2. Read Also:  Simple Ecommerce PHP Shopping Cart Application
  3. Read Also:  Laravel 6 Update Increment column
  4. Read Also:  create custom seo friendly url in vuejs Example
  5. Read Also:  [SOLUTIONS] 500 INTERNAL SERVER ERROR PHP
  6. Read Also:  Laravel Bootstrap Alert (flash message) with Examples
  7. Read Also:  Vue Toggle Switch Component ON-OFF
  8. Read Also:  How to Get Absolute Directory Path in PHP Script
  9. Read Also:  How to Get Absolute Directory Path in PHP Script
  10. Read Also:  Files Uploading on Amazon S3 server using Laravel 5.4 Part-1