#native_company# #native_desc#
#native_cta#

Send a 1-Way SMS Wireless Message with PHP

By Bob White
on October 11, 2001

Version: 2.3.0

Type: Sample Code (HOWTO)

Category: Networking

License: Other

Description: Allows you to embed SMS wireless messaging to cell phones and pagers from PHP applications of all types. Uses the Simplewire network to reach mobile users in 118 countries.

The best way is to join the Simplewire Developer Program at http://devprogram.simplewire.com. Then download the SDK as listed. Then you will receive an email explaining what to do

?>

<?
	$sms = new COM("Simplewire.SMS");

	// Subscriber Settings
	$sms->SubscriberID = "123-456-789-12345";
	$sms->SubscriberPassword = "Password Goes Here";

	// Message Settings
	$sms->MsgPin = "+1 100 510 1234";
	$sms->MsgFrom = "Demo";
	$sms->MsgCallback = "+1 100 555 1212";
	$sms->MsgText = "Hello World From Simplewire!";

	print("<b>Sending message to Simplewire...</b><br>");
	
	// Send Message
	$sms->MsgSend();

	// Check For Errors
	if($sms->Success)
	{
		print("<b>Message was sent!</b><br>");
	}
	else
	{
		print("<b>Message was not sent!</b><br>");
		print("Error Code: $sms->ErrorCode<br>");
		print("Error Description: $sms->ErrorDesc<br>");
	}
?>