Skip to main content

Send SMS with ASP

To send bulk, single, or OTP SMS from your software developed with ASP, you can use the following code block.

Function POSTHTTPXML(adres, strMesaj)
Set StrHTTP = Server.CreateObject("MSXML2.XMLHTTP")
StrHTTP.Open "POST" , adres, false
StrHTTP.setRequestHeader "Content-type:","text/xml"
StrHTTP.sEnd strMesaj
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("https://api.iletimerkezi.com/v1/send-sms", xml)
response.write cevap