Vb6 Advanced maby

Discussion in 'Software' started by mastermosley, May 9, 2005.

  1. mastermosley

    mastermosley Sergeant

    I want to take infomation off a website and show it up on the form. (my program) exp: Taking your IP of a site like www.ipchicken.com. Please tell me step by step way I can do this (doesn't have to be my example)
     
  2. Kodo

    Kodo SNATCHSQUATCH

    this one is a bit more advanced and I've only done it once a long time ago. It involves screen scraping using the MSXML object. Research screen scraping.
     
  3. Coco

    Coco Sergeant Major

    If you're just looking to display the ip info for that computer back to the user there are better ways. Like just use "shell ipconfig" and then scrape that. Although there is most likely an even better way or possibly a built in function which can return the IP.
     
  4. dedub

    dedub Corporal

    Though I am not the author of this code I am going to pass it along.

    Private Sub Command1_Click()
    Text1.Text = IPaddr
    End Sub

    Private Function IPaddr()
    Dim IP As String, Html As String
    Html = Inet1.OpenURL("http://checkip.dyndns.org/", icString)
    IP = Mid(Html, InStr(1, Html, "Address:", vbTextCompare) + 8)
    IP = Trim(Left(IP, InStr(1, IP, Chr(10), vbTextCompare) - 16))
    IPaddr = " " & IP
    End Function

    All you need is a form with a text box, a command button and the INET control

    if you can understand this code then you can direct the INET to go to ANY web site and pull ANY info you want out by parsing the text and putting it on your form.

    good luck
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds