<% String url = request.getParameter("q"); String textOfURL = ""; String actualLine = ""; java.net.HttpURLConnection uc = (java.net.HttpURLConnection) new java.net.URL(java.net.URLDecoder.decode(url)).openConnection(); uc.connect(); java.io.BufferedReader rd = new java.io.BufferedReader(new java.io.InputStreamReader(uc.getInputStream())); StringBuilder sb = new StringBuilder(); while ((actualLine = rd.readLine()) != null) sb.append(actualLine + '\n'); textOfURL = new String(sb); if (request.getParameter("enabletags") == null) textOfURL = textOfURL.replaceAll("\\<[^>]*>",""); for (int i=0; i<10; i++) { textOfURL = textOfURL.replaceAll("\t"," "); textOfURL = textOfURL.replaceAll(" "," "); textOfURL = textOfURL.replaceAll("\r","\n"); textOfURL = textOfURL.replaceAll("\n ","\n"); textOfURL = textOfURL.replaceAll("\n\n","\n"); } int textLength = textOfURL.length(); int blockSize = 2000; if (textLength > blockSize) { out.println("
Click the link to get a 2000-char-long block, one by one: "); for (int i=0; i<=textLength / blockSize; i++) out.println(""+i+""+(iClick here to see the entire page!"); int blocknr = -1; if (request.getParameter("blocknr") != null) blocknr = Integer.parseInt(request.getParameter("blocknr")); if (blocknr != -1) if (blocknr != textLength / blockSize) textOfURL = textOfURL.substring(blocknr*blockSize, (blocknr+1)*blockSize); else textOfURL = textOfURL.substring(blocknr*blockSize, textLength); %>
Click this to switch to tag-enabled mode if you don't see anything

Opera Mini copy helper (C) Werner "Menneisyys" Ruotsalainen, 2009.