Skip to content

Instantly share code, notes, and snippets.

@mheadd
Created May 18, 2011 16:50
Show Gist options
  • Save mheadd/978990 to your computer and use it in GitHub Desktop.
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.
<?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 is a
line break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment