Created
May 18, 2011 16:50
-
-
Save mheadd/978990 to your computer and use it in GitHub Desktop.
Simple PHP script for SMSified that puts a line break in the SMS message.
This file contains 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 | |
// Include the SMSifed class. | |
require 'path/to/smsified.class.php'; | |
// SMSified Account settings. | |
$username = "username"; | |
$password = "password"; | |
$senderAddress = "9999999999"; | |
try { | |
// Create a new instance of the SMSified object. | |
$sms = new SMSified($username, $password); | |
// Send an SMS message and decode the JSON response from SMSified. | |
$response = $sms->sendMessage($senderAddress, "15431234777", "This is a \n line break"); | |
$responseJson = json_decode($response); | |
var_dump($response); | |
} | |
catch (SMSifiedException $ex) { | |
echo $ex->getMessage(); | |
} |
This file contains 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
This is a | |
line break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment