private void searchPage(Request req) {
	BufferedReader in;
	try {
	    in = new BufferedReader(new InputStreamReader(req.url.openStream()));
	    String inputLine, content = "";
	    while ((inputLine = in.readLine()) != null)
		content += inputLine;
	    in.close();
	    if (content.indexOf("<div class='searchresults'>") != -1) {
		req.result = formatSearchResults(content);
		req.complete();
	    } else {
		Matcher ma = findTitle.matcher(content);
		ma.find();
		req.title = formatSymbols(ma.group(1));
		req.result = formatPage(content);
		req.complete();
	    }
	} catch (IOException e) {
	    req.result = e.toString();
	    req.complete();
	}
    }