Welcome
Login Buy Now Test now for free Call Sales at 480.515.5200 Please enter a value in the search box

This content requires the Flash Player (version 8 or higher) Please click here to download the latest Flash player. If you already have the latest Flash player, try clicking here
  • Home
  • Products
    • SMS Gateway
      • Product Overview
      • SMS Marketing
      • SDK & API
      • Global Coverage
      • Short Code Set up
      • SMS Gateway OEM
    • SecureSMS
    • SMIM Gateway
      • Product Overview
      • Micro-Client
      • SDK & API
      • OEM
    • RelationshipMobile   
      • Product Overview
      • SMS Marketing
      • SDK & API
      • OEM
      • Mobilize Your CRM
    • Wallet
      • Product Overview
      • SDK & API
      • OEM
    • FlightAssist
      • Product Overview
      • SDK & API
      • OEM
    • CampusReact
      • Product Overview
      • SDK & API
      • OEM
  • Partners
    • Overview
    • Technology Partners
    • Strategic Partners
    • System Integrators
    • Affiliates
    • Carriers
    • Handset Manufacturers
  • Industries
    • Financial Services
    • Government & Public Sector
    • Entertainment & Media
    • Education
    • Healthcare
    • Technology
    • Travel
    • Real Estate
    • Content Providers
    • Developers
    • Marketers
  • Media
    • News Room
    • Press Releases
    • Awards
    • In the News
    • Events
    • OPTiN Today Blog
  • Support
    • Support Center
    • Products Support 
      • SecureSMS & SMS Gateway
      • SMIM Gateway
      • CampusReact
      • RelationshipMobile
      • FlightAssist
      • Wallet
    • FAQ & Forums
  • Jobs
  • Contact Us
  • About
    • CellTrust™ Today
    • Brand & Values
    • Milestones
    • Customers
    • Executive Team
    • Careers at CellTrust™
    • Security Focused
    • Social Responsibility
    • Industry Affiliations
    • Investor Relations

CellTrust 2 Way SMS Gateway API (WebServices)

Home > SMS Gateway



CellTrust Web Services


Web Services enables rapid integration using standard HTTP and SOAP protocols. It provides a secure and technology-independent way of communicating with the CellTrust Multi-Channel Gateway. Using XML stream and encrypted data, Web Services provides a very reliable, high performance solution. Web Services and XML protocol creates an independent format for data exchange on any type of operating system.

Download

.Net

Sample Project: PM Console.zip

PHP Web Services Example

This is an example of using CellTrust Web Services API with PHP. The HTTP API can also be used in conjunction with PHP

Using "sendSMS" Web Service Method With PHP:
<?php
$URN = "urn:notify.soap.primemessage.com";
$WSDL="http://pmgateway.net/pmws/services/TxTMessageService?wsdl";

//SOAP elements (dont edit, and case sensitive!)
$SOAP_ACTION = "sendSMS";
$CTUSERNAME = "Username";
$CTPASSWORD = "Password";
$CTNICKNAME = "nickname";
$DESTINATION = "destination";
$MESSAGE = "message";

$USER_ID = "YourUserID"; //your username at CellTrust
$NICKNAME = "YourNickName"; //your nickname at Celltrust
$PASSWORD = "YourPassword"; //your password at Celltrust

//create user and password SOAP header elements
$UserHdr = new SoapHeader( $URN, $CTUSERNAME, $USER_ID, false);
$PassHdr = new SoapHeader( $URN, $CTPASSWORD, $PASSWORD, false);

//create SOAP body elements, add your destination phone number, and message here
$body = array($CTNICKNAME => $NICKNAME, $DESTINATION=> "18015204567", $MESSAGE => "Test Message");

//create SOAP client
$client = new SoapClient($WSDL, array('trace' => 1, 'exceptions' =>0));

//set SOAP headers
$client->__setSoapHeaders(array($UserHdr, $PassHdr));

//call web service
$result = $client->__call($SOAP_ACTION, $body, NULL);

//check for SOAP error
if (is_soap_fault($result))
{
trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_ERROR);
echo "ERROR\n";
echo $result->faultstring."\n";
}

//very usefull for debug purposes
//show what was requested
var_dump($client->__getLastRequest());
//show gateways response
var_dump($client->__getLastResponse());
?>



Using Send Message Web Service Method With PHP:

<?php
$URN = "urn:notify.soap.primemessage.com";
$WSDL="http://pmgateway.net/pmws/services/TxTMessageService?wsdl";
$encoding = SOAP_DEFAULT_ENCODING;

//SOAP elements (dont edit, and case sensitive!)
$SOAP_ACTION = "sendMessage";
$CTUSERNAME = "Username";
$CTPASSWORD = "Password";
$CTNICKNAME = "nickname";
$DESTINATION = "destination";
$MESSAGE = "message";
$RECIPIENT = "recipients";
$ADMINEMAIL = "adminEmail";
$SUBJECT = "subject";

$USER_ID = "YourUserID"; //your username at CellTrust
$NICKNAME = "YourNickName"; //your nickname at Celltrust
$PASSWORD = "YourPassword"; //your password at Celltrust
$EMAILADDRESS = "You@YourDomain.Com"; //email address where you would like a summary sent

//create user and password SOAP header elements
$UserHdr = new SoapHeader( $URN, $CTUSERNAME, $USER_ID, false);
$PassHdr = new SoapHeader( $URN, $CTPASSWORD, $PASSWORD, false);

//create SOAP body elements, add your destination phone number, and message here
$dialstring = array(array("deliveryType" => 0, "destination" => "14806490123", "firstName" => "John", "lastName" => "Doe"));

$bodymulti = array($CTNICKNAME => $NICKNAME, $MESSAGE => "Test SMS Message", $SUBJECT => "Test SMS Message Sent ", $RECIPIENT => $dialstring, $ADMINEMAIL = $EMAILADDRESS);

//create SOAP client
$client = new SoapClient($WSDL, array('trace' => 1, 'exceptions' =>0));

//set SOAP headers
$client->__setSoapHeaders(array($UserHdr, $PassHdr));

//call web service single sms
$result = $client->__call($SOAP_ACTION, $bodymulti, NULL);

//very usefull for debug purposes
//show what was requested
var_dump($client->__getLastRequest());
//show gateways response
var_dump($client->__getLastResponse());
?>


Sample Codes:

HTTP/HTTPS
WebServices
JavaSDK
SMTP (Email to SMS)
Scheduler API
Message Status API
Incoming Message Processing


See Also:

2 Way SMS Gateway
SMS Gateway Features
Global Coverage

Privacy Policy    Terms of Use    Anti Spam Policy    Industry Affiliations    Partner Options    RSS Feeds

Sitemap    © Copyright 2008 CellTrust™Corporation, All Rights Reserved