Jack Posted July 2, 2014 Posted July 2, 2014 http://pastebin.com/7c0DJifc This is so users know if their proxy is working before they start running your script. You can go ahead and write your own but I thought I might as well give out an easy way 1
Dashboard Posted July 2, 2014 Posted July 2, 2014 Some slightly cleaner code (I made my page display the ip without all of the rubbish). Might make it a millisecond or two faster . //You need to be running java 7 I believe! String ip; //where ip will be saved try { BufferedReader in = new BufferedReader(new InputStreamReader(new URL("http://superscriptfactory.com/check.php").openStream())); ip = in.readLine(); in.close(); } catch (Exception e) { //Handle no ip found } 1
Jack Posted July 2, 2014 Author Posted July 2, 2014 Some slightly cleaner code (I made my page display the ip without all of the rubbish). Might make it a millisecond or two faster . //You need to be running java 7 I believe! String ip; //where ip will be saved try { BufferedReader in = new BufferedReader(new InputStreamReader(new URL("http://superscriptfactory.com/check.php").openStream())); ip = in.readLine(); in.close(); } catch (Exception e) { //Handle no ip found } Yea I think my host must add random js to the bottom of my pages
Ziy Posted July 2, 2014 Posted July 2, 2014 For anyone who want's to host their own php for it <? echo $_SERVER["REMOTE_ADDR"]; ?>
Jack Posted July 2, 2014 Author Posted July 2, 2014 For anyone who want's to host their own php for it <? echo $_SERVER["REMOTE_ADDR"];?> 1: that does not work with php 52: that does not work for all proxies
Ziy Posted July 2, 2014 Posted July 2, 2014 Haha how crude of me, here's a decent looking guide http://www.teachmejoomla.net/code/php/remote-ip-detection-with-php.html 1
Bubble Posted July 2, 2014 Posted July 2, 2014 Nice, this will be usefull for sure! Good job guys! ;)
Botre Posted July 5, 2014 Posted July 5, 2014 http://myip.dnsomatic.com/ http://icanhazip.com/ some other pages you could add inyour catch blocks in case yours goes down