Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Database is sms -->
- <!-- Table is called numbers -->
- <!-- fields can be anything but MUST contain a field named number, and one named name, and one named group the way this is designed -->
- <?PHP
- error_reporting(E_ALL);
- $user_name = "root";
- $password = "passw0rd";
- $database = "sms";
- $server = "localhost";
- $gvoiceuser = "RTOMikey@gmail.com";
- $gvoicepass = "Lightning17872";
- $group=$_POST['group'];
- $message=$_POST['MESSAGE'];
- $number=$_POST['number'];
- $i=0;
- if ($group = "manual"):{
- $runcommand = '/usr/bin/gvoice -e ' . $gvoiceuser . ' -p ' . $gvoicepass . ' send_sms ' . $number . " " . $message . ' &';
- print "Sending message to: $number<br>\n";
- exec($runcommand);
- print "Successfully sent to: $number<br>\n";
- }
- else:{
- mysql_connect($server, $user_name, $password);
- mysql_select_db($database) or die(mysql_error());
- echo "Connected to Database";
- print "Connection to the Server opened<br>\n";
- $SQL = "SELECT * FROM numbers WHERE grp='$group'";
- $result = mysql_query($SQL);
- $num = mysql_num_rows($result);
- mysql_close();
- print "Message: $message<br><br>\n";
- while ($i < $num) {
- $phonenumber=mysql_result($result,$i,"number");
- $name=mysql_result($result,$i,"name");
- {
- $runcommand = '/usr/bin/gvoice -e ' . $gvoiceuser . ' -p ' . $gvoicepass . ' send_sms ' . $phonenumber . " " . $message . ' &';
- print "Sending message to: $name<br>\n";
- exec($runcommand);
- print "Successfully sent to: $name<br>\n";
- }
- $i++;}
- print "ALL Successfully sent to all people in $group!!<br>\n";}
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement