Skip to content

Instantly share code, notes, and snippets.

@dongilbert
Created April 18, 2012 14:15
Show Gist options
  • Save dongilbert/2413874 to your computer and use it in GitHub Desktop.
Save dongilbert/2413874 to your computer and use it in GitHub Desktop.
Send SMS Alerts via PHP
<?php
// Get the POST data, if you are sending SMS as a response to a form.
$form = $_POST['form'];
// Insert your message here. Pull some results from $form or do whatever.
$message = 'Message Here.';
$subject = 'Whatever';
$to = array(
'Sprint' => 'phonenumber@messaging.sprintpcs.com',
'Verizon' => 'phonenumber@vtext.com',
'T-Mobile' => 'phonenumber@tmomail.net',
'AT&T' => 'phonenumber@txt.att.net',
);
foreach ($to as $name => $number)
{
mail($number, $subject, $message);
}
@Juliet2345
Copy link

God id good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment