import java.io.*; import java.lang.*; import java.net.*; import java.util.*; import sfi; public class SendFrags { sfi comp; URL dataFile; private static final String key = "455ALM0O98"; private String line; SendFrags(sfi c) { comp = c; } public void sendFrags() { System.out.println("Sent in " + comp.frags + " frags to server"); String url = comp.getParameter("host") + "/cgi-bin/sfi.pl?&name=" + comp.getParameter("name") + "&passwd=" + comp.getParameter("password") + "&f=" + comp.frags + "&k=" + key; try { this.dataFile = new URL(url); } catch ( MalformedURLException e) { System.out.println("Bad URL: " + url); } try { URLConnection conn = this.dataFile.openConnection(); conn.connect(); DataInputStream data = new DataInputStream(new BufferedInputStream(conn.getInputStream())); while((line = data.readLine()) != null) { // Don't do Anything. } } catch (IOException e) { System.out.println("IO Error:" + e.getMessage()); } } }