Free Trial Account

Send an SMS Text from your Website

Here is how you can easily send a text from your website. This is very useful when you need to be notified immediately when an event is triggered on your website. For example, when a registration form is submitted or when an order is made. Simply drop in a file and add a few lines of code.

 

HTML Form example. Yours may be different.


<form name="form1" method="post" action="<?PHP print $_SERVER['PHP_SELF']; ?>">
<table width="80%">
<tr>
<td>Name <input name="name" type="text"></td>
<td>Email Address <input name="email" type="text"></td>
</tr>
<tr>
<td colspan="2"><input name="submit" type="button" value="Submit Registration"></td>
</tr>
</table>
</form>

PHP code to capture the form elements and send a text from your website.

<?PHP
if(isset($_POST['name'])){

// Do registration stuff

// Send a text
include_once(dirname(__FILE__).'/FormPostUtilities.php');
$SMSapi = new SMSapi();
$SMSapi->SendText('0851234567','Reg. Submitted from '. $_POST['name'] . ' ' . $_POST['email']);
}
?>