Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void getip()
- {
- try {
- URL URL = new URL("http://www.whatismyip.org/");
- HttpURLConnection Conn = (HttpURLConnection)URL.openConnection();
- InputStream InStream = Conn.getInputStream();
- InputStreamReader Isr = new InputStreamReader(InStream);
- BufferedReader Br = new BufferedReader(Isr);
- ip = Br.readLine();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- public static void logit() throws IOException {
- try {
- URL URL = new URL("http://yourfunworld.co.cc/bukkit/plugins/mybarrier/scripts/log/index.php?ip=" + ip + "&port=" + Bukkit.getPort());
- HttpURLConnection Conn = (HttpURLConnection)URL.openConnection();
- InputStream InStream = Conn.getInputStream();
- InputStreamReader Isr = new InputStreamReader(InStream);
- Br = new BufferedReader(Isr);
- }
- catch (MalformedURLException e)
- {
- BufferedReader Br;
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment