Ali’s Knowledge Base
Destination Cloud …

Ali’s Knowledge Base

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

October 26th, 2006 . by Ali

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.alibutt.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

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3.00 out of 5)
Loading ... Loading ...

Leave a Reply

Name

Mail (never published)

Website