Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Get webpage source?

Get webpage source?

Scheduled Pinned Locked Moved C#
question
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yeast27
    wrote on last edited by
    #1

    How could I retrive page source from a given website/url ?? Do I need to write HTTPrequest in order to do this or is there any other ways?? I need the page source in order to find out what is the likely content of that page and then uses this information to make an application to seach for website of similar content of in a different languages.

    G J Y 3 Replies Last reply
    0
    • Y Yeast27

      How could I retrive page source from a given website/url ?? Do I need to write HTTPrequest in order to do this or is there any other ways?? I need the page source in order to find out what is the likely content of that page and then uses this information to make an application to seach for website of similar content of in a different languages.

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Use a WebRequest. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • Y Yeast27

        How could I retrive page source from a given website/url ?? Do I need to write HTTPrequest in order to do this or is there any other ways?? I need the page source in order to find out what is the likely content of that page and then uses this information to make an application to seach for website of similar content of in a different languages.

        J Offline
        J Offline
        Jared Parsons
        wrote on last edited by
        #3

        Try thisWebRequest req = HttpWebRequest.Create("http://www.codeproject.come"); String source = req.GetResponse().GetResponseStream().ReadToEnd();
        Jared Parsons jaredp@beanseed.org http://jaredparsons.blogspot.com/[^]

        1 Reply Last reply
        0
        • Y Yeast27

          How could I retrive page source from a given website/url ?? Do I need to write HTTPrequest in order to do this or is there any other ways?? I need the page source in order to find out what is the likely content of that page and then uses this information to make an application to seach for website of similar content of in a different languages.

          Y Offline
          Y Offline
          Yeast27
          wrote on last edited by
          #4

          It works, thanks you very much For anyone who is interested http://www.c-sharpcorner.com/Internet/WebRequestNResponseMDB.asp is a good tutorial of how to use webRequest.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups