Welcome
Login Buy Now Free Gateway Trial 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    
    • Secure SMS
    • Secure Wallet
  • Solutions
    • Mobile Carriers
    • Mobile Banking & Finance        
    • Mobile Marketing
    • Mobile Government
    • Mobile Healthcare
    • Mobile Education
    • Mobile Real Estate
    • Mobile Air Travel
  • Developers
  • Partners
    • Overview
    • Technology Partners
    • Valued Partners
    • Value Added Resellers
    • System Integrators
    • Carriers
    • Handset Manufacturers
  • Services
    • Mobile Strategy Advisory
    • Educational Services
    • Professional Services
  • Media
    • News Room
    • Press Releases
    • Awards
    • In the News
    • Events
    • OPTiN Today Blog
  • Support
    • Support Center
    • Products Support 
      • SMS Gateway
      • SecureSMS
      • SecureWallet
      • FlightAssist
      • CampusReact
    • FAQ & Forums
  • Contact Us
  • About
    • CellTrust® Today
    • Brand & Values
    • Milestones
    • Customers
    • Executive Team
    • Careers
    • 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 Multimodal 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