Hello Friend, This Post is all about sending sms from the website using php code and mvaayoo API for sending sms. Mvaayoo is a sms gateway for sending sms. Using It user can send bulk sms in php send text message.
Sending sms using php
- Now a day sms is common thing for getting information and promote our product through promotional sms. each and every e-commerce site send bulk sms to their customer getting know about their new product and discount offer and etc.
- Sms is core factor to attract customers and get more traffic for website. Thatsway sending sms using API . it’s easy and perfect way to implement this thing.
- Now day each bank use sms facility for getting know about account balance, and ATM Transaction sms , etc this whole task did using SMSGETWAY.
- Sending sms using php, php sms, free sms gateway, online sms.
Top SMS Getway In India
- This SMS Getway are the best for the sending sms usin php. In this Tutorials I Use Mvaayoo API for sending sms.
- First You Need to create account in mvaayoo site.
- Mvaayoo gives free 20 SMS for testing purpose only and it’s work only for 9AM TO 9PM (as per as Government rules).
- So open account it’s totally free.
- This is the home page of the mvaayoo.com.
- First Register your email with mvaayoo.
- After Successful Registration you need to verify your email and mobile number through OPT.
- Then After Login with your email and password and you will get 20 Free Credit for SMS and Voice SMS.
- Here I have left 8 Credit but you will receive 20 credit. This is the dashboard of the mvaayoo sms getaway . Inside the API tab you will get all the api and demo code for sending sms.
- The whole sms system based on the HTTP Request to server for send the sms using CRUL API In php.
- Look at out the API For php and other Programming Language.
- I hide my email id and password for security . But here you will get your email id and password.
- simple code is given for sending sms using php. Copy this code and save in .php file them run it will send sms to the pacified mobile no.
- If you want more information about API integration, Then visit official document of Mvaayoo.
- Here I include one demo file for getting more understanding about this API Integration.
- Unfortunately Live Demo not possible because if it’s free for only 20 sms. But i Covered in Gif file.
DEMO File
<?php if(isset($_POST["submit"])) { //echo "submitted"; $mno = $_POST["mno"]; $message = $_POST["message"]; if(preg_match( '/^[A-Z0-9]{10}$/', $mno) && !empty($message)) { $ch = curl_init(); $user="Your Email And Password"; $receipientno= $mno; $senderID="TEST SMS"; $msgtxt= $message; curl_setopt($ch,CURLOPT_URL, "http://api.mVaayoo.com/mvaayooapi/MessageCompose"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "user=$user&senderID=$senderID&receipientno=$receipientno&msgtxt=$msgtxt"); $buffer = curl_exec($ch); if(empty ($buffer)) { echo " buffer is empty "; } else { echo $buffer; echo 'Message Send.'; } curl_close($ch); } else { echo 'Not Valid Information'; } } ?> <html> <head> <title>SMS Sending Using PHP and Mvaayoo API</title> </head> <body align="center"> <h1>SMS Sending Using PHP and Mvaayoo API</h1> <form action="" method="post"> Enter mobile no<br> <input type="text" name="mno"><br> Message<br> <textarea type="text" name="message"></textarea><br> <br> <input type="submit" name="submit" value="Send"/> </form> <h3>Total Remaining SMS</h3> <?php $ch = curl_init(); curl_setopt($ch,CURLOPT_URL, "http://api.mvaayoo.com/mvaayooapi/APIUtil"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "Your Email And password&type=0"); $buffer = curl_exec($ch); echo $buffer; curl_close($ch); ?> <h3 style="color:red"> www.TechsoftTutorials.com</h3> </body> </html>
Output: