<?php
	//Register Free To Get Ur Apikey
	//First Change Ur Apikey Below
$apikey = 'EnterUrApiKeyHere';

echo '
<title>Your website title</title>
<CENTER>
<h3><font color="green">SmS Sending Script</font></h3>
<form action="" name="frm" method="POST">
<table>
<tr>
<td>
<CENTER>Type Password:</CENTER>
<CENTER><input name="pass" type="text" value="" ><BR></CENTER>
</td>
</tr>
<tr>
<td>
<CENTER>From: (Senderid)</CENTER>
<CENTER><input name="from" type="text" value="Senderid" ></CENTER>
</td>
</tr>
<tr>
<td>
<CENTER>To: (Receiver Number)</CENTER>
<CENTER><input name="to" type="text" value="92"></CENTER>
</td>
</tr>
<tr>
<td>
<CENTER>Message:</CENTER>
</td>
</tr>
<tr>
<td>
<CENTER><textarea name="text"></textarea></CENTER>
<CENTER><input type="submit" name="submit" value="Send"></CENTER>
<CENTER><font color="orange">Powered By YourWebstieName</font></CENTER>
</td>
</tr>
</table>
</form>
</CENTER>

';

if (isset($_POST["submit"]))
			{
$pass=$_POST["pass"];
$pass = strtolower($pass);
$sender=$_POST["from"];
$receiver=$_POST["to"];
$msg=$_POST["text"];
$sender = urlencode($sender);
$receiver = urlencode($receiver);
$msg = urlencode($msg);

//pass protect
     if ($pass == 'pass1')
{
}elseif ($pass == 'pass2')
{
}elseif ($pass == 'pass3')
{
}elseif ($pass == 'pass4')
{
}elseif ($pass == 'pass5')
{
}else
{
echo "<center><font color=red>Password Incorrect Contact Admin</center></font>";
$sentpermission='false';
}

if($sentpermission!='false')
		{
//Sending...
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://smspk.net/api.php?apikey='.$apikey.'&sender='.$sender.'&receiver='.$receiver.'&msg='.$msg);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$result = curl_exec ($ch);
if (preg_match("/sent/", $result))
{
echo '<center><font color=green>MsgSent</center></font>';
}else
{
echo '<center><font color=red>ERROR!</center></font>';
}
		}
			}
?>