ASP.NET TOPLU SMS API KODLARI

ASP.NET üzerinde gerçekleştirilmiş API hizmetlerimizin örneklerine aşağıdan erişebilirsiniz.


ASP CLASSIC - XML POST - BİR MESAJI ÇOK KİŞİYE GÖNDERME

<%

Response.ContentType = "text/html"

Response.AddHeader "Content-Type", "text/html;charset=UTF-8"

Response.CodePage = 65001

Response.CharSet = "UTF-8"



Dim postURL,MUSTERINO,KULLANICIADI,SIFRE,ORJINATOR,TUR

postURL="http://panel.vatansms.com/panel/smsgonder1Npost.php"

MUSTERINO="" '5 haneli müşteri numarası

KULLANICIADI=""

SIFRE=""

ORJINATOR=""

TUR="Normal"  'Normal yada Turkce



Dim  numara1,numara2,mesaj,zaman,zamanasimi

mesaj="Bu bir test mesajidir." 'Mesajınızın eksik gitmemesi için Kullanım Kılavuzundaki karakter kodları ile gönderim yapınız.

numara1="5554443322"

numara2="5553332211"

zaman="2014-04-07 10:00:00"



Dim  XMLSTR

XMLSTR ="data=<sms><kno>" & MUSTERINO & "</kno>" &_

        "<kulad>" & KULLANICIADI & "</kulad>" &_

        "<sifre>" & SIFRE & "</sifre>" &_

        "<gonderen>" & ORJINATOR & "</gonderen>" &_

                "<mesaj>" & mesaj & "</mesaj>" &_

            "<numaralar>" & numara1 & "," & numara2 & "</numaralar>"& _

                "<tur>" & TUR & "</tur>" &_

                "</sms>"



        ' Xml içinde aşağıdaki alanlarıda gönderebilirsiniz.

        ' "<zaman>" & zaman & "</zaman>" &_  İleri tarih için kullanabilirsiniz



Dim vatan_xml

Set vatan_xml=Server.CreateObject("Msxml2.ServerXMLHTTP")

vatan_xml.Open "POST", postURL, False

vatan_xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

vatan_xml.Send XMLSTR

Response.Write(vatan_xml.responseText)

%>

ASP CLASSIC - XML POST - N MESAJI N KİŞİYE GÖNDERME

<%

Response.ContentType = "text/html"

Response.AddHeader "Content-Type", "text/html;charset=UTF-8"

Response.CodePage = 65001

Response.CharSet = "UTF-8"



Dim postURL,MUSTERINO,KULLANICIADI,SIFRE,ORJINATOR,TUR

postURL="http://panel.vatansms.com/panel/smsgonderNNpost.php"

MUSTERINO=""

KULLANICIADI=""

SIFRE=""

ORJINATOR=""

TUR="Normal"  'Normal yada Turkce



Dim  numara1,numara2,mesaj1,mesaj2,zaman,zamanasimi

numara1="5554443322"

mesaj1="Merhaba Deneme Mesajidir 5554443322"         'Mesajınızın eksik gitmemesi için Pdf'deki karakter kodları ile gönderim yapınız.

numara2="5553332211"

mesaj2="Merhaba Deneme Mesajidir 5553332211"



zaman="2014-04-07 10:00:00"



Dim  XMLSTR

XMLSTR ="data=<sms><kno>" & MUSTERINO & "</kno>" &_

        "<kulad>" & KULLANICIADI & "</kulad>" &_

        "<sifre>" & SIFRE & "</sifre>" &_

        "<gonderen>" & ORJINATOR & "</gonderen>" &_

        "<telmesajlar>" &_

            "<telmesaj><tel>" & numara1 & "</tel><mesaj>" & mesaj1 & "</mesaj></telmesaj>" &_

                "<telmesaj><tel>" & numara2 & "</tel><mesaj>" & mesaj2 & "</mesaj></telmesaj>" &_

                "</telmesajlar>" &_

                "<tur>" & TUR & "</tur>" &_

                "</sms>"



        ' Xml içinde aşağıdaki alanlarıda gönderebilirsiniz.

        ' "<zaman>" & zaman & "</zaman>" &_  İleri tarih için kullanabilirsiniz



Dim vatan_xml

Set vatan_xml=Server.CreateObject("Msxml2.ServerXMLHTTP")

vatan_xml.Open "POST", postURL, False

vatan_xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

vatan_xml.Send XMLSTR

Response.Write(vatan_xml.responseText)

%>

ASP CLASSIC - XML POST - RAPOR ÇEKME

<%

Response.ContentType = "text/html"

Response.AddHeader "Content-Type", "text/html;charset=UTF-8"

Response.CodePage = 65001

Response.CharSet = "UTF-8"



Dim postURL,KULLANICIADI,SIFRE,OZELKOD

postURL="http://panel.vatansms.com/panel/smstakippost.php"



KULLANICIADI=""

SIFRE=""

OZELKOD="" 'SMS gönderdikten sonra dönen Özelkod



Dim  XMLSTR

XMLSTR ="data=<smsrapor>" &_

        "<kulad>" & KULLANICIADI & "</kulad>" &_

        "<sifre>" & SIFRE & "</sifre>" &_

        "<ozelkod>" & OZELKOD & "</ozelkod>" &_

                "</smsrapor>"



Dim vatan_xml

Set vatan_xml=Server.CreateObject("Msxml2.ServerXMLHTTP")

vatan_xml.Open "POST", postURL, False

vatan_xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

vatan_xml.Send XMLSTR

Response.Write(vatan_xml.responseText)

%>

ASP CLASSIC - WEBSERVIS - BİR MESAJI ÇOK KİŞİYE GÖNDERME

<%

Response.ContentType = "text/html"

Response.AddHeader "Content-Type", "text/html;charset=UTF-8"

Response.CodePage = 65001

Response.CharSet = "UTF-8"



  Function WebServiseBaglan(SOAPXML)

        Set vatan_xml=Server.CreateObject("Msxml2.ServerXMLHTTP")

        vatan_xml.Open "POST", postURL, False

        vatan_xml.setRequestHeader "Content-Type", "text/xml; charset=utf-8"

        vatan_xml.Send SOAPXML

        Response.Write(vatan_xml.responseText)

  End Function



postURL="http://panel.vatansms.com/webservis/service.php"



MUSTERINO=""

KULLANICIADI=""

SIFRE=""

ORGINATOR=""

TUR="Normal" ' Normal yada Turkce

ZAMAN="" 'İleri tarih için kullanabilirsiniz 2014-01-10 10:00:00



mesaj="Deneme|61|mesajidir" 'Mesajınızın eksik gitmemesi için Pdf'deki karakter kodları ile gönderim yapınız.

numara1="5554443322"

numara2="5443332211"

numaralar=numara1&","&numara2



TekSmsiBirdenCokNumarayaGonder = "<?xml version=""1.0"" encoding=""utf-8""?>"&_

"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"&_

"<soap:Body>"&_

"<TekSmsiBirdenCokNumarayaGonder xmlns="""&postURL&""">"&_

"<kullanicino>"&MUSTERINO&"</kullanicino>"&_

"<kullaniciadi>"&KULLANICIADI&"</kullaniciadi>"&_

"<sifre>"&SIFRE&"</sifre>"&_

"<orjinator>"&ORGINATOR&"</orjinator>"&_

"<numaralar>"&numaralar&"</numaralar>"&_

"<mesaj>"&mesaj&"</mesaj>"&_

"<zaman>"&ZAMAN&"</zaman>"&_

"<tip>"&TUR&"</tip>"&_

"</TekSmsiBirdenCokNumarayaGonder>"&_

"</soap:Body>"&_

"</soap:Envelope>"



WebServiseBaglan(TekSmsiBirdenCokNumarayaGonder)

%>

ASP CLASSIC - WEBSERVIS - N MESAJI N KİŞİYE GÖNDERME

<%

Response.ContentType = "text/html"

Response.AddHeader "Content-Type", "text/html;charset=UTF-8"

Response.CodePage = 65001

Response.CharSet = "UTF-8"



  Function WebServiseBaglan(SOAPXML)

        Set vatan_xml=Server.CreateObject("Msxml2.ServerXMLHTTP")

        vatan_xml.Open "POST", postURL, False

        vatan_xml.setRequestHeader "Content-Type", "text/xml; charset=utf-8"

        vatan_xml.Send SOAPXML

        Response.Write(vatan_xml.responseText)

  End Function



postURL="http://panel.vatansms.com/webservis/service.php"



MUSTERINO=""

KULLANICIADI=""

SIFRE=""

ORGINATOR=""

TUR="Normal" ' Normal yada Turkce

ZAMAN="" 'İleri tarih için kullanabilirsiniz 2014-01-10 10:00:00



numara1="5554443322"

mesaj1="Deneme|61|mesajidir|61|5554443322" 'Mesajınızın eksik gitmemesi için kullanım klavuzundaki karakter kodları ile gönderim yapınız.

numara2="5553332211"

mesaj2="Deneme|61|mesajidir|61|5553332211"



mesajnumara="{["&numara1&"]["&mesaj1&"]}{["&numara2&"]["&mesaj2&"]}"



HerBirNumarayaFarkliSmsGonder = "<?xml version=""1.0"" encoding=""utf-8""?>"&_

"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"&_

"<soap:Body>"&_

"<HerBirNumarayaFarkliSmsGonder xmlns="""&postURL&""">"&_

"<kullanicino>"&MUSTERINO&"</kullanicino>"&_

"<kullaniciadi>"&KULLANICIADI&"</kullaniciadi>"&_

"<sifre>"&SIFRE&"</sifre>"&_

"<orjinator>"&ORGINATOR&"</orjinator>"&_

"<numaramesaj>"&mesajnumara&"</numaramesaj>"&_

"<zaman>"&ZAMAN&"</zaman>"&_

"<tip>"&TUR&"</tip>"&_

"</HerBirNumarayaFarkliSmsGonder>"&_

"</soap:Body>"&_

"</soap:Envelope>"



WebServiseBaglan(HerBirNumarayaFarkliSmsGonder)

%>

ASP CLASSIC - WEBSERVIS - RAPOR VE BİLGİ İŞLEMLERİ

<%

Response.ContentType = "text/html"

Response.AddHeader "Content-Type", "text/html;charset=UTF-8"

Response.CodePage = 65001

Response.CharSet = "UTF-8"



 Function WebServiseBaglan(SOAPXML)

        Set vatan_xml=Server.CreateObject("Msxml2.ServerXMLHTTP")

        vatan_xml.Open "POST", postURL, False

        vatan_xml.setRequestHeader "Content-Type", "text/xml; charset=utf-8"

        vatan_xml.Send SOAPXML

        Response.Write(vatan_xml.responseText)

  End Function

postURL="http://panel.vatansms.com/webservis/service.php"



MUSTERINO=""

KULLANICIADI=""

SIFRE=""

'-------------------------------------------------------------------------------------------------

Response.write("<b>SMS ID'ye GORE RAPOR ALMA:</b><br/><pre>")

ozelkod="" 'SMS gönderdikten sonra dönen Özelkod

numararapor="" 'Özelkod'a ait tüm SMS'lerin raporu için boş bırakınız.



RaporSorgula = "<?xml version=""1.0"" encoding=""utf-8""?>"&_

"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"&_

"<soap:Body>"&_

"<RaporSorgula xmlns="""&postURL&""">"&_

"<MUSTERINO>"&MUSTERINO&"</MUSTERINO>"&_

"<kullaniciadi>"&KULLANICIADI&"</kullaniciadi>"&_

"<sifre>"&SIFRE&"</sifre>"&_

"<ozelid>"&ozelkod&"</ozelid>"&_

"<numara>"&numararapor&"</numara>"&_

"</RaporSorgula>"&_

"</soap:Body>"&_

"</soap:Envelope>"

WebServiseBaglan(RaporSorgula)

Response.write("</pre>")

'-------------------------------------------------------------------------------------------------

Response.write("<b>TARIHE GORE RAPOR ALMA:</b><br/><pre>")

tarih="2014-01-30"



GunlukRaporSorgula = "<?xml version=""1.0"" encoding=""utf-8""?>"&_

"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"&_

"<soap:Body>"&_

"<GunlukRaporSorgula xmlns="""&postURL&""">"&_

"<MUSTERINO>"&MUSTERINO&"</MUSTERINO>"&_

"<kullaniciadi>"&KULLANICIADI&"</kullaniciadi>"&_

"<sifre>"&SIFRE&"</sifre>"&_

"<tarih>"&tarih&"</tarih>"&_

"</GunlukRaporSorgula>"&_

"</soap:Body>"&_

"</soap:Envelope>"

WebServiseBaglan(GunlukRaporSorgula)

Response.write("</pre>")

'-------------------------------------------------------------------------------------------------

Response.write("<b>ÜYE ve BAKİYE SORGULAMA:</b><br/><pre>")



UyeBilgisiSorgula = "<?xml version=""1.0"" encoding=""utf-8""?>"&_

"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"&_

"<soap:Body>"&_

"<UyeBilgisiSorgula xmlns="""&postURL&""">"&_

"<MUSTERINO>"&MUSTERINO&"</MUSTERINO>"&_

"<kullaniciadi>"&KULLANICIADI&"</kullaniciadi>"&_

"<sifre>"&SIFRE&"</sifre>"&_

"</UyeBilgisiSorgula>"&_

"</soap:Body>"&_

"</soap:Envelope>"

WebServiseBaglan(UyeBilgisiSorgula)

Response.write("</pre>")

'-------------------------------------------------------------------------------------------------

Response.write("<b>ORJINATOR OLUSTURMA:</b><br/><pre>")

orji="" '11 karakteri geçemez, boşluklar dahil. Türkçe karakter kullanılamaz.

aciklama=""

OrjinatorGonder = "<?xml version=""1.0"" encoding=""utf-8""?>"&_

"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"&_

"<soap:Body>"&_

"<OrjinatorGonder xmlns="""&postURL&""">"&_

"<MUSTERINO>"&MUSTERINO&"</MUSTERINO>"&_

"<kullaniciadi>"&KULLANICIADI&"</kullaniciadi>"&_

"<sifre>"&SIFRE&"</sifre>"&_

"<orjinator>"&orji&"</orjinator>"&_

"<aciklama>"&aciklama&"</aciklama>"&_

"</OrjinatorGonder>"&_

"</soap:Body>"&_

"</soap:Envelope>"

WebServiseBaglan(OrjinatorGonder)

Response.write("</pre>")

'-------------------------------------------------------------------------------------------------

Response.write("<b>ORJINATORlERI CEKME ve SORGULAMA:</b><br/><pre>")

orji1="" 'Boş bırakırsanız orjinatörlerin tümünü çeker

OrjinatorSorgula = "<?xml version=""1.0"" encoding=""utf-8""?>"&_

"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"&_

"<soap:Body>"&_

"<OrjinatorSorgula xmlns="""&postURL&""">"&_

"<MUSTERINO>"&MUSTERINO&"</MUSTERINO>"&_

"<kullaniciadi>"&KULLANICIADI&"</kullaniciadi>"&_

"<sifre>"&SIFRE&"</sifre>"&_

"<orjinator>"&orji1&"</orjinator>"&_

"</OrjinatorSorgula>"&_

"</soap:Body>"&_

"</soap:Envelope>"

WebServiseBaglan(OrjinatorSorgula)

Response.write("</pre>")

%>