public String getHtml(String address) {
      Socket smtpSocket = null;
      OutputStream os = null;
      InputStream is = null;
      String host = address;
      try {
         // Create socket to host on port 80
         smtpSocket = new Socket(host, 80);
         // Get the channels
         os = smtpSocket.getOutputStream();
         is = smtpSocket.getInputStream();
      } catch (IOException e) {
          JOptionPane.showMessageDialog(null, e.getMessage(), "Browser", JOptionPane.ERROR_MESSAGE);         
      }
      // See if the socket was created
      if (smtpSocket != null && os != null && is != null) {
          try {
              // Defines the application protocol - HTTP.
              Writer writer = new OutputStreamWriter(smtpSocket.getOutputStream(), "ISO-8859-1");
	      writer.write("GET / HTTP/1.1\n");
	      writer.write("Host: " + host + "\n");
	      writer.write("Connection: Keep-Alive\n");
	      writer.write("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14\n\n");
	      writer.flush();
              // Prepare reading page.
	      BufferedReader reader = new BufferedReader(new InputStreamReader(is, "ISO-8859-1"));
              // It reads each line of the response.
	      line = reader.readLine();
	      while (reader.ready()) { // For when it is not receiving anything.
                  line = reader.readLine();
                  if(line.startsWith("<"))
                      html += line+"\n";
                  if(line.startsWith("Set-Cookie:")){
                      cookie = cookie+line+"\n";
                      writeCookie(host,cookie);
                  }
              }
              // Closed channels.
              os.close();
              is.close();
              smtpSocket.close();
          }catch (IOException e) {
             JOptionPane.showMessageDialog(null, e.getMessage(), "Browser", JOptionPane.ERROR_MESSAGE);
          }
      }
      return html;   
   }