Skip to main content

AccessTr.neT


Userform İle Tanımlı Adresten Sms Atmak

Userform İle Tanımlı Adresten Sms Atmak

#19
Hocam kodların son hali bu ve bu kodlarla sms gönderme yapmıyor artık.

Private Sub Gönder_Click()
Dim sifre As String

kno = "00000"
kad = "00000"
'ksifre = ""
ksifre = Application.InputBox("Şifreyi giriniz", "ŞİFRE")
orjinator = ComboBox1


Dim i As Integer
Trk = Array("ı", "İ", "ğ", "Ğ", "ü", "Ü", "ş", "Ş", "ö", "Ö", "ç", "Ç")
Ing = Array("i", "I", "g", "G", "u", "U", "s", "S", "o", "O", "c", "C")

If ComboBox1.ListIndex = -1 Then
MsgBox "Gönderici Başlığını Geçemezsiniz...", vbCritical, "HATA"
Exit Sub
End If

If ComboBox2.ListIndex = -1 Then
MsgBox "Gönderim Şeklini Boş Geçemezsiniz...", vbCritical, "HATA"
Exit Sub
End If

If ComboBox2.Value = "Türkçe" Then
For i = 0 To 11
TextBox19.Value = Replace(TextBox19, Ing(i), Trk(i))
Next
End If



Dim tur As String
tur = ComboBox2
Dim smsNN As String
smsNN = vbNullString

smsNN = "data=<sms><kno>" & kno & "</kno><kulad>" & kad & "</kulad><sifre>" & ksifre & "</sifre>" & _
"<gonderen>" & orjinator & "</gonderen>" & _
"<telmesajlar>"


smsNN = smsNN + "<telmesaj><tel>" & TextBox18.Value & "</tel><mesaj>" & TextBox19.Value & "</mesaj></telmesaj>"


smsNN = smsNN + "</telmesajlar>" & _
"<tur>" & tur & "</tur></sms>"

Dim oXmlHttp As MSXML2.XMLHTTP60
Set oXmlHttp = New MSXML2.XMLHTTP60
URL = "http://panel.vatansms.com/panel/smsgonderNNpost.php"
oXmlHttp.Open "POST", URL, False
oXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

Dim bytArguments() As Byte
bytArguments = StrConv(smsNN, vbFromUnicode)
oXmlHttp.send bytArguments

Dim bytRetData() As Byte
bytRetData = oXmlHttp.responseText

Dim cevap As String
cevap = bytRetData

Dim ilkKarakter As String
ilkKarakter = Left$(cevap, 1)
If ilkKarakter = "1" Then
MsgBox "SMS Gönderimi Başarıyla Tamamlandı.!"
Else
MsgBox "SMS Gönderimi BAŞARISIZ.!"
End If
Set oXmlHttp = Nothing
Debug.Print smsNN

End Sub
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
RE: Userform İle Tanımlı Adresten Sms Atmak - Yazar: hayalibey - 09/01/2021, 19:43
Task