General Notes on the Web

  1. HTTP Specs
    HTTP1.0, HTTP1.1, (WIDL)
  2. Multipurpose Internet Mail Extensions (MIME) info

    A gold MIME of information is at http://www.oac.uci.edu/indiv/ehood/MIME/MIME.html.

  3. Common Port assignments for our favorite programs
    13 daytime - gives the date and time
    21 FTP - for controlling a file transfer session
    23 telnet
    25 smtp - mail transfer
    53 Domain Name Server
    70 gopher
    80 http - web pages!!!
    110 mail server pop3
    119 news
    194 Internet Chat Relay

    Oddly enough you can use telnet to interact with these ports. For example, you can get mail the old fashioned way by telneting into port 110 ( Bold text is user input).

    telnet texas.mail.net 110
    +OK QPOP (version 2.3) at mail1.texas.net starting.
    USER myusername
    +OK Password required for mfincher.
    PASS mypassword
    +OK myusername has 1 message (1936 octets).
    RETR 1
    +OK 1936 octets
    Your mail message is here .
    DELE 1
    +OK Message 1 has been deleted.
    QUIT
    +OK Pop server at mail1.texas.net signing off.


    Common POP3 commands from http://www.andover.net/update/vol1is2.html:
    Command Comment
    USER joeuser (Enter your e-mail username)
    PASS password (Enter your mailbox password)
    LIST (List all messages and their sizes)
    STAT (Tell me how many messages there are and total size)
    TOP 3 20 (Show me the first 20 lines of message number 3)
    DELE 2 (Delete message number 2)
    RSET 2 (...on second thought, don't delete message number 2)
    RETR 6 (Show me all of message number 6)
    LAST (Tell me the number of the last message accessed)
    NOOP (Do nothing. Useful for testing the server's response)
    QUIT (I'm done with you. See you later. Have a nice life.)
  4. you can simulate a browser by telnet'ing to port 80 of www.netscape.com and entering,
    GET / HTTP/1.0
    Accept: */*
    User-Agent: CestMoi/1.0
    
    
    and the header returned from www.netscape.com is,
    HTTP/1.0 200 OK
    Server: Netscape-Enterprise/2.01
    Date: Thu, 31 Jul 1997 14:02:25 GMT
    Content-type: text/html
    
    and a bunch of other stuff.
    
  5. To print the environmental variables passed to a cgi program use the following.
    #!/usr/bin/perl
    
    MAIN:
    {
        print "Content-type: text/html\n\n";
        print "$ENV{'QUERY_STRING'}\n\n";
        foreach $something (keys(%ENV))
        {
    	print "$something = $ENV{$something}\n";
        }
    }
    
    Output will be like:
    GATEWAY_INTERFACE = ...
    REQUEST_METHOD = 
    HTTPS = 
    HTTP_REFERER = 
    HTTP_USER_AGENT = 
    HTTP_SEC_FETCH_USER = 
    SERVER_PORT = 
    REMOTE_PORT = 
    HTTP_ACCEPT_LANGUAGE = 
    HTTP_COOKIE = 
    

  6. Speeds ADSL receives 1.5Megabit transmission 384Kbit
    T1 - 1.5 Megabit
    T3 - 45 Megabit
    ISDN - 64K + 64K
  7. What's a DNS?

    Domain Name Service is a computer that translates human addresses (e.g., www.fincher.org) to numbers (e.g., 207.167.87.50 ). Sometimes you get a "Host not found" error, when the host is actually there. The problem is that the request to translate the human name to numbers is made via UDP (User Datagram Protocal) which can timeout during high traffic times. Most request on the web are sent using TCP (Transmission Control Protocol), which takes longer but is more reliable.

  8. How do I get the IP address given a url? A side effect of using "ping" on a site gives the IP address (this may not always work, since some sites no longer support "ping" because that "ping of death" attack). WebBug should always get it for you.
  9. A cool utility I like is webbug from Aman software. It shows the HTTP protocol flowing between browsers and servers. It shows things like the browser version, types of media, cookies passed.
  10. A good web server report log analyzer is Marketwave's Hit List. Available for free at http://www.marketwave.com
  11. A wonderful html validator is available free at netmechanic. They also have a GIFBot that reduces the size of your GIFs and JPEGs. Its great!
  12. To register your own domain name go to www.register.com.
  13. To lookup who owns a domain, try something like
    http://www.internic.net/cgi-bin/whois?fincher.org
  14. To view the dns records for a site go to rs.internic.net/cgi-bin/whois and lookat the "Domain servers" at the end of the page.
    Then query that domain server for the dns record.
    nslookup - ns1.emcee.com
    >ls -d fincher.org
    
  15. RFC822 defines valid email addresses this way. No regular expression really captures this very well.
         6.  ADDRESS SPECIFICATION
         6.1.  SYNTAX
         addr-spec  =  local-part "@" domain        ; global address     local-part  =  word *("." word)            ; uninterpreted                                            
         ; case-preserved     domain      =  sub-domain *("." sub-domain)
         sub-domain  =  domain-ref / domain-literal
         domain-ref  =  atom                        ; symbolic reference     domain-literal =  "[" *(dtext / quoted-pair) "]"     atom        =  1*<any CHAR except
     specials, SPACE and CTLs>     specials    =  "(" / ")" / "<" / ">" / "@"  ; Must be in quoted-                 /  "," / ";" / ":" / "\" / <">  ;  string, to use        
             /  "." / "[" / "]"              ;  within a word.     word        =  atom / quoted-string