Java code: Open IE browser and close it

I want to refresh my blog on Sohu to increase the visitor count. The following is the code for open IE browser and then close it. This will be done every 5 seconds, and in one day the count should be able to increase 3600*24/5 = 17280. So If you open your computer 10 days,  the count will become 172800. That will be an popular blog. It doesn’t work for your website, but seems to work for those blogs site.

public class OpenClose {
	public static void main(String[] args) {
		while(true){
			try {
				Process p = Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore.exe \"http://www.google.com\"");
				Thread.sleep(5000);
				p.destroy();
				System.out.println("Return value was " + p.waitFor());
			} catch (Exception e) {}
		}
	}
}

You may also like:

Leave a comment