Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7929813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:12:44+00:00 2026-06-03T20:12:44+00:00

I had a question earlier involving php and mysql on this same project, This

  • 0

I had a question earlier involving php and mysql on this same project,

This is .net, Im trying to read the source of my php response, and stop after a certain character or phrase, in which mine is <br />

I Tried google, and got no luck, Im hoping somebody here can save me!

here is my current code.

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles     Button1.Click
        Dim request As System.Net.HttpWebRequest =    System.Net.HttpWebRequest.Create("http://mywebsite/db.php?hwid=" + TextBox1.Text)
        Dim response As System.Net.HttpWebResponse = request.GetResponse()
        Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
    Dim name As String = sr.ReadToEnd
        If name = "" Then
            MessageBox.Show("HWID Not Activated!", "Error: Invalid HWID")
        Else
            MessageBox.Show("Welcome, " + name)
            Me.Hide()
            Form1.Show()
        End If
    End Sub

I Want to stop reading everything after the source at <br />

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:12:45+00:00Added an answer on June 3, 2026 at 8:12 pm

    You can find where the “<br />” is and get the string before that:

    Dim s = "Andrew<br />Morton"
    Dim brIndex = s.IndexOf("<br />")
    Dim myName As String = ""
    If brIndex >= 0 Then
        myName = s.Substring(0, brIndex)
    End If
    Console.WriteLine(myName)
    ' outputs: Andrew
    

    Also, you need to call .Close() on the HttpWebResponse.

    And, the string concatenation operator in VB.NET is “&”, not “+”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a better understanding of a question I had earlier. I have the
i had asked earlier about the same kind of question but that was in
I had an earlier question about integrating Mathematica with functions written in C++. This
This is a knowledge topic based on an earlier question I had today. These
I had asked a question about this earlier, but it didn't get answered right
I had this question earlier and it was concluded it was a bug in
This is a follow up to my earlier question . Tomcat 5.0.28 had a
I had asked a question earlier( How to keep this counter from reseting at
I had earlier posted a question, regarding same, but over here i want guidance
This is a question that came from an earlier problem I had . Basically,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.