/** * Gets a file from a URL and prints it out to the console. * * Copyright (C) 2012 Mithat Konar */ final String THE_URL = "http://www.w3.org"; String[] lines; void setup() { lines = loadStrings(THE_URL); if (lines != null) { println("there are " + lines.length + " lines"); for (int i=0; i < lines.length; i++) { println(lines[i]); } println("There were " + lines.length + " lines."); } else println("Problem loading " + THE_URL); }