Customers

Policies

C#, C++, PHP, Perl, Java code for sending bulk SMS text messages

To help you get started with developing your own web service or application
for sending SMS text messages, we are pleased to share the following source
code, scripts and applications in a number of popular programming languages.

Sample Code

Some of the code examples are provided by Connection Software, and we are
delighted to also share with you some of the solutions that our customers
have been kind enough to contribute. We hope that these examples will provide
the spark of inspiration required for your SMS text messaging application.

C++ Send SMS Application

A Linux based solution for
sending SMS using the SOAP to SMS
API. The makefile downloads the WSDL file from the csoft.co.uk website and then uses
gSOAP to generate the client code to make the SOAP calls. An included main.cpp stub
provides a simple command-line based method for initiating the sending of a plain
text or flash message.

Visual C++ .NET Send SMS Application

A complete dialogue-based sample application written using VC++ .NET 2003 which
prompts for your Username, PIN, To: number list, and Message and submits it when you press Send. The return from the
server is displayed in a pop-up message box.

Contributed By:

Connection Software

CSoftSendSMS5Client.cpp

CSoftSendSMS5Client.h

// CSoftSendSMS5Client.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "CSoftSendSMS5Client.h"
#include "CSoftSendSMS5ClientDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CCSoftSendSMS5ClientApp
BEGIN_MESSAGE_MAP(CCSoftSendSMS5ClientApp, CWinApp)
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
// CCSoftSendSMS5ClientApp construction
CCSoftSendSMS5ClientApp::CCSoftSendSMS5ClientApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
// The one and only CCSoftSendSMS5ClientApp object
CCSoftSendSMS5ClientApp theApp;
// CCSoftSendSMS5ClientApp initialization
BOOL CCSoftSendSMS5ClientApp::InitInstance()
{
// InitCommonControls() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise, any window creation will fail.
InitCommonControls();
CWinApp::InitInstance();
AfxEnableControlContainer();
CoInitialize(NULL);
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
CCSoftSendSMS5ClientDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
CoUninitialize();
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}

Visual C# .NET Send SMS Application

A complete dialogue-based sample application written using C#.NET which
prompts for your Username, PIN, To: number list, and Message and submits it when you press Send. The return from the
server is displayed in a pop-up message box.

Contributed By:

Colin Millar

ReadMe.txt

MainForm.cs

MainForm.resx

CSoftSmsService.cs

The CSoftSmsService.cs file is a customised version of the wrapper for
the SMS service generated by wsdl.exe. There are bugs in the generated
code which cause an exception to be raised when creating an instance of
the Service class that you need to send out SMSs. The version here
represents a fixed copy of this generated file that does not cause this exception.
Colin Millar
colin@colinmillar.com

J2SE Send SMS Application

A complete dialogue-based sample
application written using J2SE and the Netbeans 4.0 IDE which
prompts for your Username, PIN, To: number list, and Message and submits it when you
press Send. The return from the server is displayed in a pop-up message box.

csoft - send SMS messages with csoft.co.uk
==========================================
Sam Morris <sam@robots.org.uk>
'csoft' is a Python package that interfaces with the
http://en.wikipedia.org/wiki/SMS[Short Message Service] (SMS) delivery service
provided by http://www.csoft.co.uk/[Connection Software].
Two executable scripts are included:
* `csoft-sms`, which sends a message to the phone number provided as the first
command-line argument.
* `check_csoft_messages`, a http://www.nagios.org/[Nagios] plugin that
monitors the number of messages left in your account.
The scripts look for your username and PIN in the `Username` and `PIN`
environment variables.
Downloads
---------
Releases of 'csoft' can be downloaded from
http://robots.org.uk/src/csoft/releases/[].
Requirements
------------
* http://www.python.org/[Python]. I develop and run with version 2.4, but
earlier versions should also work.
* http://pywebsvcs.sourceforge.net/[Zolera SOAP Infrastructure] (ZSI) package.
* http://chandlerproject.org/bin/view/Projects/MeTooCrypto[M2Crypto] package.
Bugs and Limitations
--------------------
The scripts are basically functional but need polishing, which I will do before
the initial (0.1) release.
Contributing
------------
If you find this tool useful or have any other comments, ideas for improvements
or even patches, please let me know: send email to mailto:sam@robots.org.uk[Sam
Morris].
Copyright, License and Warranty
-------------------------------
(C) 2007 Sam Morris <sam@robots.org.uk>
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see http://www.gnu.org/licenses/[].

Connection Software Windows Send/Receive SMS SDK

A Windows DLL based SDK that allows you to simply add the ability to send SMS (and optionally receive)
from any application, programming language or scripting language that can call a DLL. Supports secure connections and is compatible with
many corporate firewalls and proxy servers. It includes sample code for Visual C++, Visual Basic 6 and Visual Basic 7.NET.

Visual Basic Send SMS Function

Sends SMS text messages with fail-over. Attempts to send the message using the primary server and checks the server response. If there is a problem, it tries the
secondary server. If either server responds with success ("01") it exits the loop.

The sample code on this page is provided as-is, without warranty of any kind, either
expressed or implied. We strongly urge all developers to exhaustively test
their applications based on this code prior to deployment. Further contributions will be
gratefully received and acknowledged.