• Log in or sign up for an account here: https://www.sythe.org/login

C# html source grabber

  • Thread starter Thread starter Gander
  • Start date Start date
G

Gander

Guest
Basicly this works like the URL function in Java.
Code:
using System;
using System.IO;
using System.Net;


public class grabSource{
    
     public static void main(string[] args){
String recieve;
            try
            {
                WebRequest url = WebRequest.Create("http://google.com");
                WebResponse response = url.GetResponse();
                StreamReader input = new StreamReader(response.GetResponseStream());
               recieve = input.ReadToEnd().ToString();
                
Console.WriteLine(recieve);
url.Close();
input.Close();
response.Close();
            }
            catch(Exception ee){
      
Console.WriteLine(ee.ToString());

  }
    }
}

Do with what you want w/ recieve.


Also programming and teaching C# for runescape or paypal money.

I'm also very familiar w/ php,html,mysql,D, And Java.


Also some of you may know me, i'm very famous among Runescape private servers, I made (rs-server.net) Sadly, dead, I got fucked over by that nub Kevin ;)

Anyway, enough of my life story, enjoy the tutorial
 
You could also achieve this by using a Webclient and using Webclient.download or something like that. After the webclient has finished downloading, you can make it show the HTML in a text box.

That's for Visual C# .NET 2005 Express Edition and uses System.net as well.
 
duelarena.gg
Back
Top