VBScript

SMS Scripts - VBScript

Shreeweb provides you with some ready-made scripts that are available to help you connect to our gateway through your chosen programming language. These scripts all work with the HTTP API. Click here ot Contact Us and try our service.

Send SMS with VBScript:

Use the VBScript code below to send SMS via the Shreeweb SMS Gateway. Simply Contact Us for an HTTP API account, and you will receive an test account with free credits to try our service.

Code Sample:

Dim sUrl,
Dim sPassword, sUsername, sMobileNo, sText, sSender, sType
Dim oXMLHTTP, sPostData, sResult
sUrl = "http://sms.shreeweb.com/sendsms/sendsms.php"
sUsername = "xxxx"
sPassword = "xxxx"
sMobileNo = "xxxx"
sSender = "xxxx"
sType = "TEXT"
sText = "This is an example message"
sPostData = sPostData & "&username=" & sUsername
sPostData = sPostData & "&password=" & sPassword
sPostData = sPostData & "&mobile=" & sMobileNo
sPostData = sPostData & "&sender=" & sSender
sPostData = sPostData & "&type=" & sType
sPostData = sPostData & "&message=" & sText
Set oXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
oXMLHTTP.Open "POST", sUrl, false
oXMLHTTP.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
oXMLHTTP.Send sPostData
sResult = oXMLHTTP.responseText
Set oXMLHTTP = nothing
Response.Write sResult

Last Updated on Thursday, 10 October 2013 01:31
 
Copyright © 2017 Shreeweb | All Rights Reserved.