Thursday 16 August 2012

send sms to mobile using php api


send sms to mobile using php api 





Database Filed








Values in Database



sms.php

<html>
<head>
</head>

<body>

<?php

$con=mysql_connect("localhost","root","");
mysql_select_db("test");

$pass=rand();
$epass=md5($pass);
if(isset($_POST['txtmail'])&&($_POST['txtmail']!=""))
{

?>

<?php

echo $msg="Your UserId=".$_POST['txtmail']." "."and Password is=".$pass;



$sql="insert into msg(username,password,mobile) values('".$_POST['txtmail']."','$epass',".$_POST['txtmno'].")";

?>

<iframe style="display:none" src="http://api.mVaayoo.com/mvaayooapi/MessageCompose?user=user_name@gmail.com:user-password&senderID=TEST SMS&receipientno=<?php echo $_POST['txtmno'];  ?>&dcs=0&msgtxt=<?php echo $msg;  ?>&state=4">
<?php

//$ssql="select * from msg where pass='".md5($_POST[''])."'";
mysql_query($sql);
}

?>

<form method="post">

<table border="1" align="center">

<tr>

    <td>Enter Your EmailId</td>
    <td><input type="text" name="txtmail" />
</tr>


<tr>

    <td>Enter Your MobileNo</td>
    <td><input type="text" name="txtmno" />
</tr>

<tr>
    <td><input type="submit" name="submit" value="Submit" /></td>
    <td><input type="reset" name="reset" value="Cancle" /></td>
</tr>


</table>
</form>
</body>
</html>






demo of send sms to mobile using php api

Share This
Previous Post
Next Post

0 Comments: