LogicSMS - Bulk SMS and VOICE service provider
backBulk SMS and VOICE Service Provider
Sign Up   Buy Credits   Coverage List   Integration Information    Contact    Help 
Call Center 0861 114 221
support@logicsms.co.za
Username      
Password   
forgot passwordDownload LogicSMS 4 WindowsBulk Email Information

  
faq iconKnowledge Base (Integration Information)
 
HTTP Integration
  1) Http Posts (API)

  2) C# Example

  3) Visual Basic Example

FTP Integration
  1) Basic FTP Information

  2) Advanced FTP
(BLAST FILE FORMAT)


SMPP Integration
  1) SMPP Information

Branded LogicSMS
  1) Branding LogicSMS
as your own


MS-SQL Server Integration
  1) Send SMS using MS-SQL
(Very Simple)


Premium SMS Integration
  1) Posting back the
message in real time


Voice Messaging Integration
  1) HTTP posts to dial a phone
& play a message



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;

namespace LogicSMSCSharpExample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

string HttpPost(string uri, string parameters)
{
// parameters: name1=value1&name2=value2
WebRequest webRequest = WebRequest.Create(uri);
//string ProxyString =
// System.Configuration.ConfigurationManager.AppSettings
// [GetConfigKey("proxy")];
//webRequest.Proxy = new WebProxy (ProxyString, true);
//Commenting out above required change to App.Config
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.Method = "POST";
byte[] bytes = Encoding.ASCII.GetBytes(parameters);
System.IO.Stream os = null;
try
{ // send the Post
webRequest.ContentLength = bytes.Length; //Count bytes to send
os = webRequest.GetRequestStream();
os.Write(bytes, 0, bytes.Length); //Send it
}
catch (WebException ex)
{
MessageBox.Show(ex.Message, "HttpPost: Request error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
if (os != null)
{
os.Close();
}
}
try
{ // get the response WebResponse webResponse = webRequest.GetResponse();
if (webResponse == null)
{ return null; }
StreamReader sr = new StreamReader
(webResponse.GetResponseStream());
return sr.ReadToEnd().Trim();
}
catch (WebException ex)
{
MessageBox.Show(ex.Message, "HttpPost: Response error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return null;
}


private void button1_Click(object sender, EventArgs e)
{
string sRes;
string sUrl;
string sParams;
string sState;
string sId;
System.Xml.XmlDocument oDoc = new System.Xml.XmlDocument();


sUrl="http://www.logicsms.co.za/postmsg2.aspx";
sParams = "username=uuu@org&password=*****&mobile=2782000000&message=Test&Originator=REPLY";
sRes=HttpPost(sUrl,sParams);
Console.WriteLine(sRes);
oDoc.LoadXml(sRes);
sState = oDoc.ChildNodes.Item
(1).ChildNodes.Item(1).InnerXml;
sId = oDoc.ChildNodes.Item(1).ChildNodes.Item(0).InnerXml;
Console.WriteLine("SMS " + sState + " with reference number " + sId);


} // end HttpPost
}
}




bottomline


Sign up   |   Buy Credits   |   Coverage List   |   Integration Information   |   Contact   |   Help   |   Terms and Conditions
Copyright © 2009   LogicSMS