Send SMS text messages from your web site, part 2

Publication: APC Magazine
Issue: Volume 28, Number 7, July 2008

The second article of the 2 part series on sending SMS text messages from your web site. The magazine is available in newsagents in Australia and New Zealand.

Processing the Submitted Form Now that we can authenticate ourselves after last month’s tutorial, and we know the API command to send a text message, we need to tie that in with the processing of the web form. To start we’ll need t modify our original script and check to see if the we form was submitted. If the form has been submitted, there are a few things we want to do.

  1. Check that the recipient mobile number is at least 10 digits long and only contains digits.
  1. Truncate the message to 160 characters