Code Samples

Perl

We offer code samples to make it easy for you to plug in SMS functionality into your applications.Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample #!/usr/bin/perl -w$file=”cgi-lib”;do $file || die “Fatal Error: Can’t load cgi library – $file\n”;&ReadParse;use CGI qw(:all);use LWP::UserAgent;$ua …

Perl Read More »

VB.NET

We offer code samples to make it easy for you to plug in SMS functionality into your applications. Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample Public Class MessageDim postURL As String = “http://www.2sms.com/xml/xml.jsp” Dim username As StringDim password As StringSub …

VB.NET Read More »

VBA

We offer code samples to make it easy for you to plug in SMS functionality into your applications. Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample Sub test()     Dim xmlstring As String     Username = “user@mailaddress.com”    Password = “yourpass”    Message …

VBA Read More »

Python

We offer code samples to make it easy for you to plug in SMS functionality into your applications. Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample #!/usr/bin/env python import httplib def sendSMS(username, password,destination, message):        body = “<?xml version=\”1.0\” encoding=\”UTF-8\” ?>”+\               “<Request …

Python Read More »

PHP

We offer code samples to make it easy for you to plug in SMS functionality into your applications. Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample $user = ‘user@company.com’;$pass = ‘myPassword’; $text = substr($HTTP_POST_VARS[‘text’], 0, 160); $mobnum = $HTTP_POST_VARS[‘mobnum’]; $result = …

PHP Read More »

C#

We offer code samples to make it easy for you to plug in SMS functionality into your applications.Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample private string formXml(string username, string password, string destination, string message){ // create xml stringstring …

C# Read More »

Scroll to Top