Jump to content

HTML Reader

- - - - -

  • Please log in to reply
No replies to this topic

#1
seph6664

seph6664

    Newbie

  • Members
  • PipPip
  • 10 posts
So I was given this code to mess around with but I am not good enough at java yet to realize where exactly I enter the URL I want to visit.
Also there is more to the code but I believe this is the part concerning the new URL so this is all I posted.

Can anyone help me out here?


public static void main(String[] args) throws MalformedURLException, IOException {

	URL url = new URL(args[0]);

	String targetAgency = args[1] ;

	String targetNumber = args[2] ;


	while (true) {

		HttpURLConnection connection = (HttpURLConnection)url.openConnection();

		Date now = new Date() ;

		System.out.println(now) ;

		downloadURL(connection, targetAgency, targetNumber);

	try {

		Thread.sleep(3600000);

		}

	catch (InterruptedException x){

		x.printStackTrace() ;

		}

	

	connection.disconnect();

	

//	System.exit(0);

	}

}





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users