Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    BassSR's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    5,824
    Reputation
    570
    Thanks
    330

    Help (Get text from .php website) [solved]

    Im trying to make a program that grabs the TRUE or FALSE fom a site and then tells my program which it is and the program will either have a text box or like a different picture.
    heres what i have so far.
    https://i.imgur.com/qYwW5.png
    its just the webbrowser loading the PHP page and showing the text, but i want the program to know which it says (true or false) and then show a certain text box or show a certain picture
    thanks

  2. #2
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    [highlight=vb.net]
    Dim useable As Boolean = False
    Using wClient As New Net.WebClient()
    useable = wClient.DownloadString("http:/rwebsite").ToLower().Contains("true")
    End Using
    [/highlight]

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  3. #3
    BassSR's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    5,824
    Reputation
    570
    Thanks
    330
    Quote Originally Posted by Jason View Post
    [highlight=vb.net]
    Dim useable As Boolean = False
    Using wClient As New Net.WebClient()
    useable = wClient.DownloadString("http:/rwebsite").ToLower().Contains("true")
    End Using
    [/highlight]
    Wow thanks, ill try some thinks


    @Jason
    how do i use it, its abit confusing
    Last edited by BassSR; 09-18-2011 at 11:57 PM.

  4. #4
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by BassSR View Post

    Wow thanks, ill try some thinks


    @Jason
    how do i use it, its abit confusing
    What's confusing? You put the php link in where i put "http:/rwebsite", the webclient downloads the pagesource from there, checks whether it contains "true". the "useable" variable now tells you whether the page said true or false

    [highlight=vb.net]
    Dim useable As Boolean = False
    Using wClient As New Net.WebClient()
    useable = wClient.DownloadString("http:/rwebsite").ToLower().Contains("true")
    End Using
    If Not useable Then 'the pagesource didn't contain "true"
    MessageBox.Show("This is unuseable")
    Else
    MessageBox.Show("This is useable!")
    End if
    [/highlight]

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  5. #5
    BassSR's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    5,824
    Reputation
    570
    Thanks
    330
    Quote Originally Posted by Jason View Post


    What's confusing? You put the php link in where i put "http:/rwebsite", the webclient downloads the pagesource from there, checks whether it contains "true". the "useable" variable now tells you whether the page said true or false

    [highlight=vb.net]
    Dim useable As Boolean = False
    Using wClient As New Net.WebClient()
    useable = wClient.DownloadString("http:/rwebsite").ToLower().Contains("true")
    End Using
    If Not useable Then 'the pagesource didn't contain "true"
    MessageBox.Show("This is unuseable")
    Else
    MessageBox.Show("This is useable!")
    End if
    [/highlight]
    So you doing like Uni now?
    is it for coding still or is that jsut a hobby?
    you knew me as apex of ap exh aks :3

    your a fucking boss VB coder i swear
    Thanks man

  6. #6
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Yeah I am doing Uni.

    Thread marked solved.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  7. #7
    BassSR's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    5,824
    Reputation
    570
    Thanks
    330
    Nice, grats on it
    ok when i do it, i want to mkae the images visiable and invisable
    whic i did like this:
    Code:
      If Not useable Then 'the pagesource didn't contain "true"
                PictureBox1.Visible = True & PictureBox2.Visible = False & PictureBox3.Visible = False
            Else
                PictureBox2.Visible = True & PictureBox1.Visible = False & PictureBox3.Visible = False
            End If
    dosnt seem to work tho

  8. #8
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by BassSR View Post
    Nice, grats on it
    ok when i do it, i want to mkae the images visiable and invisable
    whic i did like this:
    Code:
      If Not useable Then 'the pagesource didn't contain "true"
                PictureBox1.Visible = True & PictureBox2.Visible = False & PictureBox3.Visible = False
            Else
                PictureBox2.Visible = True & PictureBox1.Visible = False & PictureBox3.Visible = False
            End If
    dosnt seem to work tho
    You can't just link lines together like that

    [highlight=vb.net]
    PictureBox1.Visible = useable
    PictureBox2.Visible = useable
    PictureBox3.Visible = useable
    [/highlight]

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  9. #9
    BassSR's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    5,824
    Reputation
    570
    Thanks
    330
    Code:
      Dim useable As Boolean = False
            Using wClient As New Net.WebClient()
                useable = wClient.DownloadString("************").ToLower().Contains("FALSE")
            End Using
            If Not useable Then 'the pagesource didn't contain "true"
                PictureBox1.Visible = True
                PictureBox2.Visible = False
            Else
                PictureBox1.Visible = False
                PictureBox2.Visible = True
            End If
    dosnt work.
    wont change images on change of the text on the site
    Last edited by Jason; 09-19-2011 at 04:38 AM.

  10. #10
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Outside link removed. Next time you post one I have to report it.

    And the reason it's not working is because that page is broken:

    [highlight=php]
    Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in ***********.php on line 4
    [/highlight]

    AND BECAUSE you converted the string "ToLower()", then checked if it contained "FALSE" which is in uppercase lol, of course that's going to fail.
    Last edited by Jason; 09-19-2011 at 04:41 AM.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  11. #11
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by BassSR View Post
    Code:
      Dim useable As Boolean = False
            Using wClient As New Net.WebClient()
                useable = wClient.DownloadString("************").ToLower().Contains("FALSE")
            End Using
            If Not useable Then 'the pagesource didn't contain "true"
                PictureBox1.Visible = True
                PictureBox2.Visible = False
            Else
                PictureBox1.Visible = False
                PictureBox2.Visible = True
            End If
    dosnt work.
    wont change images on change of the text on the site
    Because the parsed result of your php doesn't contains the string 'FALSE'.

  12. #12
    BassSR's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    5,824
    Reputation
    570
    Thanks
    330
    the only words there are true or false

  13. #13
    qwerty01's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    180
    Reputation
    9
    Thanks
    225
    My Mood
    Lurking
    Quote Originally Posted by BassSR View Post
    ...
    wClient.DownloadString("************").ToLower().Contains("FALSE")
    ...
    I bolded the parts you should pay attention to.

  14. #14
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by BassSR View Post
    the only words there are true or false
    Not when I visited the link: There was a PHP error. Try this and see what happens

    [highlight=vb.net]
    Using wClient As New Net.WebClient()
    MessageBox.Show(wClient.DownloadString("********** **").ToLower())
    End Using
    [/highlight]

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  15. #15
    BassSR's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    5,824
    Reputation
    570
    Thanks
    330
    i screwed up but the only text there is either true or false

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help] Get text from webbrowser... [solved]
    By AceKill3r in forum Visual Basic Programming
    Replies: 3
    Last Post: 08-02-2011, 04:58 PM
  2. [HELP]Get image from resources
    By ♪~ ᕕ(ᐛ)ᕗ in forum Visual Basic Programming
    Replies: 2
    Last Post: 03-28-2011, 08:58 PM
  3. [HELP]Get your OS Version, Vb2008[Solved]
    By hitmen69 in forum Visual Basic Programming
    Replies: 11
    Last Post: 02-05-2011, 02:47 AM
  4. [help]read text from an online .txt[Solved]
    By trevor206 in forum Visual Basic Programming
    Replies: 10
    Last Post: 09-24-2010, 03:36 PM
  5. [SOLVED]is there anyone someone could help me get unbanned from mw2 multiplayer
    By Devin7713 in forum Call of Duty Modern Warfare 2 Help
    Replies: 8
    Last Post: 07-30-2010, 02:31 PM