Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.1 KB

README.md

File metadata and controls

37 lines (26 loc) · 1.1 KB

random-token.xyz

Just visit https://random-token.xyz/LENGTH to receive your pseudo-random token! Build Status

wget:

wget https://random-token.xyz/LENGTH

PHP:

$token = file_get_contents("https://random-token.xyz/LENGTH");

Java:

private static String fetchToken(int length) throws IOException {
        URL url = new URL("https://random-token.xyz/" + length);
        
        InputStreamReader inputStreamReader = new InputStreamReader(url.openStream());
        BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
        
        StringBuilder tokenBuiler = new StringBuilder();
        String line;
        
        while ((line = bufferedReader.readLine()) != null) {
            tokenBuiler.append(line);
        }
        
        return tokenBuiler.toString();
}

You can get Tokens between 1 and 200 characters in length.

Coming features:

  • no token collision
  • choice between upper-/lower-case, numbers or mix