Subscribe to Windows IT Pro
October 19, 2006 12:00 AM

How can I use Telnet to download an element of a Web page?

Windows IT Pro
InstantDoc ID #93953
Rating: (2)

A. I recently wanted to download a file from a Web site without using a browser, just in raw text format. I used the Telnet command to perform the operations normally performed as part of the HTTP download process, which are essentially a series of GET commands. To initiate the connection, telnet to port 80 (instead of the default port 23) of the Web site, as the following example shows:

  c:\>telnet www.savilltech.com 80  
Nothing will be displayed to screen. Type the GET command in uppercase letters:

    

GET /index.html (press enter twice)

The page will then be displayed in the command window, and the Telnet session will terminate. You might need to append "HTTP/1.0" at the end of the GET command (as the example below shows) depending on the Web server you're connecting to. This tells the server which version of HTTP your client understands.

    

GET /index.html HTTP/1.0

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.