Hallo Habe da mal eine Frage,
unzwar Kann Ich mich nicht mehr Erinnern wie man Code war für den Useragent für Chome kann mir da jemand auf die sprünge helfen ?
unzwar Kann Ich mich nicht mehr Erinnern wie man Code war für den Useragent für Chome kann mir da jemand auf die sprünge helfen ?
VB.NET-Quellcode
- Private Function Q(ByVal Site As String, ByVal Met As String, ByVal Post As String, Optional ByVal IP As String = "", Optional ByVal Port As String = "") As String
- Try
- Dim H As HttpWebRequest = CType(HttpWebRequest.Create(Site), HttpWebRequest)
- H.Method = Met
- H.UserAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0" ' hier
- H.ContentType = "application/x-www-form-urlencoded"
- H.AllowAutoRedirect = True
- H.CookieContainer = C
- H.Proxy = Proxy
- If H.Method = "POST" Then
- Dim S As New StreamWriter(H.GetRequestStream(), System.Text.Encoding.Default)
- S.Write(S)
- S.Close()
- End If
- Dim R As New StreamReader(H.GetResponse().GetResponseStream())
- T = R.ReadToEnd
- Catch ex As Exception
- MessageBox.Show("Verbindungsfehler", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)
- End Try
- Return T
- End Function