لدي مشكله اصادفها وهي ان الاحرف العربيه لاتظهر بشكل صحيح في textbox
كود :
Private Sub Login_Click()
With W
.Close
.RemoteHost = "website.com"
.RemotePort = 80
.Connect
End With
Private Sub W_Connect()
'On Error Resume Next
Dim Packet As String
Dim Post As String
With W
Packet = Packet & "Host: web.com" & vbNewLine
Packet = Packet & "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" & vbNewLine
Packet = Packet & "Accept-Language: ar,en-US;q=0.9,en;q=0.8" & vbNewLine
Packet = Packet & "Accept-Encoding: gzip, deflate" & vbNewLine
Packet = Packet & "Connection: close" & vbNewLine
Packet = Packet & "X-Requested-With: XMLHttpRequest" & vbNewLine
Packet = Packet & "Pragma: no-cache" & vbNewLine
Packet = Packet & "cache -Control: no-cache" & vbNewLine
Packet = Packet & "Content-Length: " & Len(Post) & vbNewLine & vbNewLine & Post
data = Empty
On Error Resume Next
If .State = 7 Then
W.SendData Packet
End If
End With
End Sub
Private Sub W_DataArrival(ByVal bytesTotal As Long)
Dim data As String
If W.State = 7 Then
W.PeekData data
txtData.Text = data
'lblConnect.Caption = "connecting ok"
If InStr(data, "مرحبا") Then
msgbox "welcome"
Else
msgbox "not found"
End If
End If
End Sub