Connecting to a url?
I have been trying to make a simple java program that connects to a specific url. I have made a script with php, that saves the "value or string" of a. ( www.webpage.com/file.php?a=this_text_is_saved. How i get java program to connect to this url? I have tried this:
import java.awt.*;
import java.applet.*;
import java.lang.*;
import java.net.*;
import java.io.*;
publicclass oma{
publicstaticvoid main(String arg[]){
try
{
URL url =new URL("http://www.webpage.com/file.php?a=savepls");
URLConnection urlConnection = url.openConnection();
urlConnection.connect();
}
catch (Exception ex)
{
return;
}
}
}
It compiles it, and runs it. But nothing is saved on my webpage. And yes, php script works when i write adress manually to browser. Any help and suggstions are welcome :) . And im a noob with java, so talk to me, like u talk to little children lol.

