Download goes here. If you like it, rate it
here.
Functionality
Forget everything I published at this place
before! Here goes a professional solution
for sending SMS out of a VB program. I was
tired of adapting my program to
all those
upcoming and declining web sites providing
free SMS. Hence I defined a COM interface,
which covers the needs of a typical
application in terms of sending SMS. Your
application runs against this interface and
has no clue about the objects implementing
the interface. I also provide a couple of
COM objects implementing the interface.
These COM objects are proxy objects invoking
the actual interface of the SMS provider.
They do not deliver the messages themselves.
Currently there are proxy objects for
Clickatell,
SMSx,
ICQ (free),
kSMS (free)
and SAP-internal usage.
Clickatell and SMSx
are not free but more reliable.
Clickatell is
pretty cheap so I prefer it. Please go to
Clickatell thru
this link. This makes me
earn some cents.
Prerequisites
The prerequisite for the main installation are:
These components are not contained in the install
package due to technical and licensing issues. The
installer package will tell you whether
one of these components is missing.
This third generation no longer uses XMLHTTP, ServerXMLHTTP, or AspTear.
Instead it uses WinInet. This is good news
and bad news. Good news because you no
longer need buy or install one of these
objects. And because coding a proxy becomes
easier. You no longer need to care about
cookies - mostly. Bad news as the technology
is not server-capable because WinInet is
not.
Installation
Thanks to my new MSI installation package of
the product shouldn't be a problem. The
current version of the installation expects you
to have VB runtime and related components
installed. Please let me know when you need
a more complete installation package because you want to install the
software on a clean PC. After installation
you have some more COM objects on your
machine plus a sample application which you
can invoke from the Start menu.
Usage
Start the program installed in the Start
menu and send an SMS.
How it works
Please inspect the source code for detailed explanations.
The best commented source projects are
SendMessage.vbp and ProxyClickatell2.vbp.
Please also notice the comments for the
interface object "Klemid's interface for
mobile messaging" in the Object Browser.
Known issues (as of 29-Oct-2002)
ICQ only allows 10 messages per day and is
very slow
kSMS is very unreliable. It currently seems
not to work at least for T-Mobile phones.
How to write your own proxy
When you want to adopt this code to access other SMS providers you can give me
an order to do that for some fee. When you want to
waste your own time please
consider the following hints:
- This is a developer's corner. From developer for developers. Therefore it
expects you to be familiar with VB and a little bit with COM.
I can't teach you VB.
- The easiest to use providers are
those providing a Web service like
SMSx or kSMS. This is because there
is a standard way of accessing the
interface and the interface is more
or less guaranteed to be stable.
Clickatell doesn't have an actual
web service but an http-oriented
interface. Clickatell also provides
a COM object which does the http
communication for you. This is used
in the project ProxyClickatell1.
Advantage of this project compared
to ProxyClickatell2 is that you can
use more sophisticated functions of
the COM object that are not
supported by my interface. Things
become difficult when you start
replaying standard web forms. The
ICQ proxy is a sample for this.
- Concerning the latter:
For simple sites inspect your service's HTML source and find out which URL it
serves and what the parameters are. My tool Form Sniffer can help you to analyze the HTTP request issued by the form. A
more sophisticated sniffer is
HttpTracer. Please register this
tool. It's worthwhile.
- Check whether the form fires an HTTP Post or Get.
My code assumes HTTP Post. For HTTP
Get it is slightly different but I have no sample for this.
- When your site requires a logon every time things become
more complicated. You
would have to fake the logon, maybe
handle some redirects, and
send the actual submit request. It may happen that
you need to intercept a redirect in
order to get some session information.
- Some sites use load balancing, i.e. the logon request is dispatched to the less
busy server of a server family. For example, this is the case when the logon is
submitted to http://www... and the next page's URL
is http://www3... or something like this. This would force you to
intercept the redirect and extract
the redirection URL from the HTTP
response.
- Once you implemented a proxy object,
you need to add some registry
information manually in order to
give the Send program notice of it.
This is because VB is not able to
add component category information
to a COM object. Even worse, each
time you recompile the object, the
previously entered registry
information is lost. To accomplish
this, take one of the Category.reg
files as a template and replace the
CLSID by the concrete class ID of
your object. You can figure this out
for example by using the Microsoft
Visual Studio tool "OLE View".
- If you have a solution for other sites I would appreciate to get it for
publishing.
- Some downloaders experienced compile problems: An
error [BadImplements...] occurred. This can be
circumvented by compiling only with project compatibility.
It may have something to do with differing olelib.tlb
versions.
Revisions
| 01 Jul 2000 |
Initially submitted for site www.billiger-telefonieren.de |
| 11 Jul 2001 |
www.billiger... has closed it's service due to misuse ;-) |
| 04 Aug 2001 |
Submitted the next generation |
| 04 Sep 2001 |
Added ASP support |
| 04 Sep 2001 |
Added 'Send SMS' to this site |
| 24 Oct 2002 |
Submitted the next
generation using proxy objects |
| 04 Dec 2002 |
Added missing source file
modRegistry |
| 03.Mar.2004 |
Links updated |
| |
|
|