Skip to main content

Send SMS with ASP

You can use the code block below to send bulk, single or OTP sms from your software made with ASP.

Function POSTHTTPXML(address, strMessage)
Set StrHTTP = Server.CreateObject("MSXML2.XMLHTTP")
StrHTTP.Open "POST" , address, false
StrHTTP.setRequestHeader "Content-type:","text/xml"
StrHTTP.sEnd strMessage
GETHTTPXML = StrHTTP.Responsetext
Set StrHTTP = Nothing
End Function

answer=""

xml="<request>" & _
"<authentication>" & _
" <key></key>" & _
" <hash></hash>" & _
"</authentication>" & _
"<order>" & _
" <sender></sender>" & _
" <sendDateTime></sendDateTime>" & _
" <message>" & _
" <text><![CDATA[…]]></text>" & _
" <receipents>" & _
" <number></number>" & _
" </receipents>" & _
" </message>" & _
"</order>" & _
"</request>"

answer = POSTHTTPXML("http://api.iletimerkezi.com/v1/send-sms", xml)
response.write answer