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.
Code Sample:
Dim sUrl, Dim sAPI_ID, sPassword, sUsername, sMobileNo, sText Dim oXMLHTTP, sPostData, sResult sUrl = "http://login.smsgatewayhub.com/API/WebSMS/Http/v1.0a/index.php?" sPassword = "xxxx" sUsername = "xxxx" sMobileNo = "xxxx" sText = "This is an example message" 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 SMSGATEWAYHUB by clients. As such, accuracy is not guaranteed by SMSGATEWAYHUB.