Testare la funzionalità di un server web tramite Telnet

Nel casi si voglia controllare che un sito web sia raggiugibile senza utilizzare il browser per verificare o escludere eventuali problemi sullo stesso è possibile utilizzare Telnet, di seguito un esempio su come leggere la pagina web di google.com:

telnet google.com 80<Invio>
GET / HTTP/1.0<Invio>
<Invio>

Se non ci sono problemi l’output dovrebbe essere di questo tipo:

HTTP/1.0 302 Found
Location: http://www.google.it/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=cc92f746fe7d2cec:TM=1224708302:LM=1224708302:S=UrDW4Jf04XjY3
HdA; expires=Fri, 22-Oct-2010 20:45:02 GMT; path=/; domain=.google.com
Date: Wed, 22 Oct 2008 20:45:02 GMT
Server: gws
Content-Length: 218
Connection: Close

<HTML><HEAD><meta http-equiv=”content-type” content=”text/html;charset=utf-8″>
                                                                              <T
ITLE>302 Moved</TITLE></HEAD><BODY>
                                   <H1>302 Moved</H1>
                                                     The document has moved
                                                                           <A HR
EF=”http://www.google.it/”>here</A>.
</BODY></HTML>

Per ulteriori informazioni si veda HOW TO- Request a Web Page Through a Telnet Client.