public static string Sendget (String url,string param)
{
String result = "";
try{
String urlname = URL + "?" +param;//
URL U = new URL (urlname);
URLConnection connection = U.openconnection ();
Connection.connect ();
BufferedReader in = new BufferedReader (New InputStreamReader (Connection.getinputstream ()));
String Line;
while (line = In.readline ())!= null)
{
result + = line;
}
In.close ();
}catch (Exception e) {
SYSTEM.OUT.PRINTLN ("no result.") "+e);
}
return result;
}
public static string Sendpost (String url,string param)
{
String result= "";
try{
URL httpurl = new URL (URL);
HttpURLConnection httpconn = (httpurlconnection) httpurl.openconnection ();
Httpconn.setdooutput (TRUE);
Httpconn.setdoinput (TRUE);
PrintWriter out = new PrintWriter (Httpconn.getoutputstream ());
Out.print (param);
Out.flush ();
Out.close ();
BufferedReader in = new BufferedReader (New InputStreamReader (Httpconn.getinputstream ()));
String Line;
while (line = In.readline ())!= null)
{
result + = line;
}
In.close ();
}catch (Exception e) {
SYSTEM.OUT.PRINTLN ("no result.") "+e);
}
return result;
}