Цитата: twix ➤ можно здесь подробнее? (8
конечно :) нам не жалко
две функции на vb - под другое - адаптируйте сами*54
Public Function sl_SEND_SMS_WWW(swPHONE As String, swMESSAGE As String, swWWW As String) As Boolean
On Error Resume Next
Dim XMLHTTP As Object, swCODE As String, swTRANSLIT As Byte, swSMSBODY As Variant
sl_SEND_SMS_WWW = False
If Len(swPHONE) = 10 And Len(swMESSAGE) > 0 Then
swCODE = Mid$(swPHONE, 1, 3)
swPHONE = Mid$(swPHONE, 4)
swTRANSLIT = 0
swSMSBODY = "number_sms=number_sms_send&adv_year=&termtype=G&translit=" & swTRANSLIT & "&y=4&x=5&prf=7" & swCODE & "&phone=" & swPHONE & "&message=" & sl_SEND_SMS_WWW_TRANS(swMESSAGE) & "&submit=" & sl_SEND_SMS_WWW_TRANS("Отправить")
Set XMLHTTP = CreateObject("MSXML2.XMLHTTP")
XMLHTTP.Open "POST", swWWW, False
XMLHTTP.SetRequestHeader "Content-type", "application/x-www-form-urlencoded"
XMLHTTP.send swSMSBODY
If XMLHTTP.Status = 200 Then sl_SEND_SMS_WWW = True
Set XMLHTTP = Nothing
End If
End Function
Private Function sl_SEND_SMS_WWW_TRANS(SourceString As String) As String
On Error Resume Next
Dim i As Integer, C As String
For i = 1 To Len(SourceString)
C = Asc(Mid$(SourceString, i, 1))
If C = 32 Then
sl_SEND_SMS_WWW_TRANS = sl_SEND_SMS_WWW_TRANS + "+"
ElseIf (C < 48 Or C > 126) Or (C > 56 And C <= 64) Then
sl_SEND_SMS_WWW_TRANS = sl_SEND_SMS_WWW_TRANS + "%" + Hex$(C)
Else
sl_SEND_SMS_WWW_TRANS = sl_SEND_SMS_WWW_TRANS + Chr$(C)
End If
Next
End Function
адрес:
на телефоне: 0684002 - разрешить прием сообщений с сайта от всех пользователей, 0684003 - запретить прием сообщений с сайта от всех пользователей