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. The Lounge
  3. downloading a web page with telnet

downloading a web page with telnet

Scheduled Pinned Locked Moved The Lounge
comtutorialquestion
5 Posts 5 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.
  • M Offline
    M Offline
    mike7411
    wrote on last edited by
    #1

    I am trying to download a web page with telnet. I used to do this back in around 1998, and it worked. I tried this at the command line on Windows 11: telnet www.example.com 80 Then I typed "GET /" and hit enter twice. However, it returns a 404 instead of the web site. Anyone know what's wrong? Thanks.

    N K M honey the codewitchH 4 Replies Last reply
    0
    • M mike7411

      I am trying to download a web page with telnet. I used to do this back in around 1998, and it worked. I tried this at the command line on Windows 11: telnet www.example.com 80 Then I typed "GET /" and hit enter twice. However, it returns a 404 instead of the web site. Anyone know what's wrong? Thanks.

      N Offline
      N Offline
      Nelek
      wrote on last edited by
      #2

      mike7411 wrote:

      Anyone know what's wrong?

      The forum where you asked. :) Try here[^]

      M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

      1 Reply Last reply
      0
      • M mike7411

        I am trying to download a web page with telnet. I used to do this back in around 1998, and it worked. I tried this at the command line on Windows 11: telnet www.example.com 80 Then I typed "GET /" and hit enter twice. However, it returns a 404 instead of the web site. Anyone know what's wrong? Thanks.

        K Offline
        K Offline
        k5054
        wrote on last edited by
        #3

        mike7411 wrote:

        Anyone know what's wrong?

        You're using the wrong tool. Try [GNU Wget 1.21.4 for Windows](https://eternallybored.org/misc/wget/) instead e.g. wget --output-file=example.com www.example.com assuming, of course that you're not prevented from adding software to your system You might also try [curl shipped by Microsoft](https://curl.se/windows/microsoft.html), but that processes the HTML. There might be a flag to give you the raw text, but I didn't see one in a brief perusal of the man page. Bonus: both handle HTTPS negotiations, so that might make up your mind, right there.

        "A little song, a little dance, a little seltzer down your pants" Chuckles the clown

        1 Reply Last reply
        0
        • M mike7411

          I am trying to download a web page with telnet. I used to do this back in around 1998, and it worked. I tried this at the command line on Windows 11: telnet www.example.com 80 Then I typed "GET /" and hit enter twice. However, it returns a 404 instead of the web site. Anyone know what's wrong? Thanks.

          M Offline
          M Offline
          markkuk
          wrote on last edited by
          #4

          They dropped support for obsolete HTTP versions and your request isn't valid HTTP/1.1. Try:

          GET / HTTP/1.1
          Host: www.example.com

          1 Reply Last reply
          0
          • M mike7411

            I am trying to download a web page with telnet. I used to do this back in around 1998, and it worked. I tried this at the command line on Windows 11: telnet www.example.com 80 Then I typed "GET /" and hit enter twice. However, it returns a 404 instead of the web site. Anyone know what's wrong? Thanks.

            honey the codewitchH Offline
            honey the codewitchH Offline
            honey the codewitch
            wrote on last edited by
            #5

            You need a host header GET / HTTP/1.1 Host: example.com

            Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

            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