Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1008750 // IP & Country Web Bot

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1671L/12K/40K).

1  
!7
2  
3  
html {
4  
  S ip = params.get("ip");
5  
  if (nempty(ip)) {
6  
    S country = ipToCountry(ip);
7  
    ret "IP: " + ip + "<br>Country: " + or(country, "?");
8  
  } else {
9  
    ip = directClientIP();
10  
    S country = ipToCountry(ip);
11  
    ret "Your IP: " + ip + "<br>Your country: " + or(country, "?");
12  
  }
13  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1008750
Snippet name: IP & Country Web Bot
Eternal ID of this version: #1008750/8
Text MD5: 74990e705c54f53e3ac2b1b11aabff4b
Transpilation MD5: 20087892da3506763b156322e73dac26
Author: stefan
Category: javax / html
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-17 00:26:52
Source code size: 305 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 658 / 9728
Version history: 7 change(s)
Referenced in: [show references]