me Banner
TECH
HARDWARE CISCO LINUX MICROSOFT C++ HTML JAVASCRIPT PERL SHELL SCRIPTING SQL NOTES

How to check your webserver with Telnet
Telnet can be used to download webpages.

Telnet www.mydomain.com 80
Trying 127.196.196.23
Connected to www.mydomain.com
Escape character is '^]'.
GET /index.html HTTP/1.0
HTTP/1.1 200 OK
Content-Length: 205
Content-Type: text/html
Last-Modified: Fri, 13 Oct 2006 19:58:50 GMT
Accept-Ranges: bytes
ETag: "3e718802efc61:71a"
Server: Microsoft-IIS/6.0
Date: Fri, 06 Apr 2007 17:03:11 GMT
Connection: close

<html>
<head>
  <title>Hello world</title>
</head>
<body>
Hello world
</body>
</html>


Connection to host lost.

Common Commands:

CONNECT For use with a proxy that can change to being an SSL tunnel.
DELETE Deletes the specified resource.
GET Requests a representation of the specified resource. By far the most common method used on the Web today. Should not be used for operations that cause side-effects (using it for actions in web applications is a common misuse).
GET /tech/html/index.shtml HTTP/1.0
   or
GET /index.html HTTP/1.0
If-Modified-Since: Tue, 18 Feb 2003 14:38:31 GMT

   or
GET /index.html HTTP/1.0
Connection: keep-alive
HEAD Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content.
HEAD /tech/html/index.shtml HTTP/1.0
OPTIONS Returns the HTTP methods that the server supports. This can be used to check the functionality of a web server
POST Submits data to be processed (e.g. from an HTML form) to the identified resource. The data is included in the body of the request. This may result in the creation of a new resource or the updates of existing resources or both.
POST /cgi-bin/search.pl HTTP/1.0
Content-type: application/x-www-form-urlencoded
Content-length: 35

email=YOUR_EMAIL&query=1crn
PUT Uploads a representation of the specified resource.
TRACE Echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request.

See also:
http://en.wikipedia.org/wiki/HTTP#Request_methods