Created
April 18, 2012 14:15
-
-
Save dongilbert/2413874 to your computer and use it in GitHub Desktop.
Send SMS Alerts via PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' => '[email protected]', | |
'Verizon' => '[email protected]', | |
'T-Mobile' => '[email protected]', | |
'AT&T' => '[email protected]', | |
); | |
foreach ($to as $name => $number) | |
{ | |
mail($number, $subject, $message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
God id good