Hi,
I want to made program to get some text from web page source .
For Ex. GameZConnect | User Profile
I want to get this from source
Line 101, var uid_crr_user = "u0Seo1y2DcbYoU8oKUNpJ227";
I want only u0Seo1y2DcbYoU8oKUNpJ227
My code:
Help me plz.
Thanks.
I want to made program to get some text from web page source .
For Ex. GameZConnect | User Profile
I want to get this from source
Line 101, var uid_crr_user = "u0Seo1y2DcbYoU8oKUNpJ227";
I want only u0Seo1y2DcbYoU8oKUNpJ227
My code:
VB.NET:
Imports System.NetImports System.IOImports System.Text.RegularExpressions
Public Class Form1
Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork Try
Dim rq As HttpWebRequest = HttpWebRequest.Create("http://gamezconnect.com/" + Me.TextBox1.Text) Dim rs As HttpWebResponse = rq.GetResponse() Dim sr As StreamReader = New StreamReader(rs.GetResponseStream()) Dim strHtml As String = sr.ReadToEnd() sr.Close() rs.Close()
Dim Mt2 As MatchCollection = Regex.Matches(strHtml, "(var uid_crr_user = .*;)", RegexOptions.IgnoreCase) If Mt2.Count > 0 Then TextBox2.Text = Mt2.Item(0).Value.Split(" = ")(1).Replace(";", "") End If
Catch
End Try End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click BackgroundWorker1.RunWorkerAsync() End SubEnd Class
Help me plz.
Thanks.