Send SMS with VBScript

Use the VBScript code below to send SMS via Developers’ Central. Simply register for an HTTP API account, and you will automatically receive 10 FREE SMS credits to try our service.

Dim sUrl,
Dim sAPI_ID, sPassword, sUsername, sMobileNo, sText
Dim oXMLHTTP, sPostData, sResult
sUrl = "http://api.clickatell.com/http/sendmsg"
sAPI_ID = "xxxx"
sPassword = "xxxx"
sUsername = "xxxx"
sMobileNo = "xxxx"
sText = "This is an example message"
sPostData = "api_id=" & sAPI_ID
sPostData = sPostData & "&user=" & sUsername
sPostData = sPostData & "&password=" & sPassword
sPostData = sPostData & "&to=" & sMobileNo
sPostData = sPostData & "&text=" & 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

Please note that some of the above code has been supplied to Clickatell by clients. As such, accuracy is not guaranteed by Clickatell.