16-12-22, 11:38 PM
(16-12-22, 01:21 AM)اليوم السابع كتب : Imports System.Netاشكرك اخي الكريم تم حل المشكلة لما ضفت الواردات دي.
Imports System.IO
Imports System.Text
Public Class Form1
Dim tempCookies As New CookieContainer
Dim byteData As Byte()
Private postData As String
Private postReq As HttpWebRequest
Private postreqstream As Stream
Private postresponse As HttpWebResponse
Dim encoding As New System.Text.UTF8Encoding
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
postReq = DirectCast(WebRequest.Create("https://pastebin.com/raw/bPc5Nec0"), HttpWebRequest)
postReq.Method = "GET"
postReq.KeepAlive = True
postReq.ContentType = "application/x-www-form-urlencoded"
postReq.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36"
postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
Dim thepage1 As String = postreqreader.ReadToEnd
Application.DoEvents()
End Sub
End Class
تفضل تعمل بشكل صحيح
هذه الطريقه الصحيحه للأتصالا
اهتم اكتر بال ContentType
و ال UserAgent
Imports System.IO
Imports System.Text
