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.

[1678 byte] By [NWooTa] at [2007-11-26 21:44:33]
# 1

URL url = new URL("http://www.webpage.com/file.php?a=savepls");

You have to open the input stream. That is when the request is actually made

InputStream inStream = url.openStream();

Remember to close the stream above, preferrably in a 'finally' block.

inStream.close();

warnerjaa at 2007-7-10 3:32:27 > top of Java-index,Java Essentials,New To Java...
# 2
WHAHHAWAHHAHAH Its Alive! Its Alive!! Whahahaaaaaaaaaaaaaaaaaaaaa...!! Thanks alot!
NWooTa at 2007-7-10 3:32:27 > top of Java-index,Java Essentials,New To Java...