problem with reading from a website
i have created a program that will read the source from a website and then do other things. however i cannot get my program to read from the website that i want to work with. all it returns is null, over and over.
here is the part of code that i guess reads from the website.
when i change the url to:
if(buttonObj == searchButton)
String name = nameField.getText();
URL url = new URL("http://www.kingsofchaos.com/battlefield.php?jump=&search_type=s&search=" + name);
URLConnection connection = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
// this isnt in my actual program but is just to show the output
for(int i = 0; i < 20; i++)
line = in.readLine();
i get the actual source code which is what i want.
URL url = new URL("http://www.yahoo.com");