Getting external IP with groovy Posted on 28 June 2017 at 12:01.Written by Mustafa Kerim Yılmaz URL url = new URL("http://mkysoft.com/ip.php"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); InputStream is = connection.getInputStream(); return org.apache.commons.io.IOUtils.toString(is);
Leave a Reply