June 24, 2008

Above the diagram shows how our product works. We’re goingt to employ the text messaging technology’ Http Post Request’. The fellowing information shows how it incorporate with PHP or other programing languages.

<%@ Import Namespace=”System.Net” %>
<%@ Import Namespace=”System.IO” %>
<script language=”C#” runat=”server”>

void Page_Load(Object Src, EventArgs E) {
myPage.Text = readHtmlPage(“;);
private String readHtmlPage(string url)
String result = “”;
String strPost =
StreamWriter myWriter = null;
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);

//add Proxy info if required
//objRequest.Proxy = WebProxy.GetDefaultProxy();
//objRequest.Proxy.Credentials = CredentialCache.DefaultCredentials; //uses logged on user
//objRequest.Proxy.Credentials = new System.Net.NetworkCredential(“UserName”, “Password”); // Alternative – specify the user and password to use

objRequest.Method = “POST”;
objRequest.ContentLength = strPost.Length;
objRequest.ContentType = “application/x-www-form-urlencoded”;
myWriter = new StreamWriter(objRequest.GetRequestStream());
catch (Exception e)
return e.Message;
finally {

HttpWebResponse objResponse =
using (StreamReader sr =
new StreamReader(objResponse.GetResponseStream()) )
result = sr.ReadToEnd();
// Close and clean up the StreamReader
return result;


HTTP POST can be used in all modern programming languages including ASP, ASP.NET, c++, c#, php, VB, VB.NET, command lines, SSH & cURL. The following section outlines how to send messages using either php or ASP. We can provide examples in other languages on request, simply Contact Us at

Meet the simple SMS API variables


A flag to switch on/off debug information. The following info is returned when info is set to 1:

TestMode= 0 for live, 1 for testing (messages don’t go to handset and credits not deducted)

MessageReceived= The received message

URLReceived= The received WAP PUSH URL (not required)

ScheduledDate= The received scheduled SMS time (not required)

Custom= The received custom ID to be passed back in receipt (not required)

From= The received SMS originator. Uses account default if blank

CreditsAvailable= Number of credits at start. You can also call, passing uname and pword to get a credit total.

MessageLength= Length of the message in characters

MessageCount= Number of messages (break at 160, 306, 459, 612)

NumberContacts= The number of comma separted numbers

CreditsRequired= Credits required for job (MessageCount * NumberContacts)

CreditsRemaining= Credits remaining after the job

Error=No credit
Error=Not enough credit for send
Error=Invalid login
Error=Message Too Long (>612 characters)
Error=Message not sent. Please check your data – especially the numbers. Are they all in INTERNATIONAL format?


This is the test mode. If test=1 then messages will not be sent and credits will not be deducted.


The url on the Txtlocal server where we receive your messages. This is static and can not be changed. Always use: – preferably using HTTP(s) for your own security.


The text message body. This can be up to 612 characters in length. A single message is 160 characters, longer messages are 153 each (2=306,3=459,4=612). You can insert any merge data into this message from your database before submitting to txtlocal. To insert a newline character use %n.


The “From Address” that is displayed when the message arrives on handset. Can only be alpha numeric or space. Min 3 chars, max 11 chars.


Your username


Your password


A comma separated list of international mobile numbers. Each number must be PURELY numeric, no + symbols or hyphens or spaces. The numbers must start with the international prefix. In UK this would be 447xxxxxxxxx. For more prefixes click here.


This is not mandetory. If set, you can send a WAP PUSH (mobile internet bookmark) to a mobile phone. Simply set to a valid url (eg,


This is not mandetory. If set, you can record a custom ID against the the message batch, which will be passed back in the delivery receipt.


This is not mandetory. Alternate receipt URL. Instead of using the receipt URL in the Txtlocal Account Settings, receipts will be sent to this URL.


This is not mandetory. The scheduled message date/time. In the format YYYY-MM-DD-HH-MM-SS (e.g 2008-03-28-14-56-00). Scheduled messages can be viewed and deleted via your Txtlocal online account.