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

John Savill

October 18, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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  

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like