|For the TargetSMS Gateway API some basic technical knowledge is required, in particular scripting and preferably knowledge of databases. |
To help you with the implementation we offer you the following example scripts 'as is'. The examples are divided in 3 groups: general scripts with class-includes, which are used by other examples, namely the examples for both subscription and non-subscription services.
The httprequest-class will be used by all other examples and will do POST requests without using file(), fopen(), cURL or other modules which might be turned off by several ISP's. Your provider must allow socket connections to 22.214.171.124 - 126.96.36.199 and 188.8.131.52 - 184.108.40.206 to use this script:
The second example describes a class with functions to be used in scripts that handle MO messages and send back info for making an MT message. The last example contains all variable data which can be changed.
Handling of non-subscription services
In this script you can find an example handler for one-off SMS services. This is useful for non-subscription services, for which a reply to an incoming SMS is expected.
Handling of subscription services
For the handling of subscription services you need several scripts. One script is necessary to handle signups and signoffs:
There are several ways to send messages to your subscribers, for example by creating a job on the TargetSMS site. Messages can also be posted to our API, either with jobs (all members the same message) or an invididual message per member. See the following examples:
>> Click here to download the examples package as .ZIP