Php simply generates a set of random strings and multiple groups of random strings.
This example describes how to generate a random string in php. We will share this with you for your reference. The details are as follows:
Generate a group:
<? Php $ str = "0123456789abcdefghijklmnopqrstuvwxyz ~ @ # () _ "; // Output character set $ n = 10; // output String Length $ len = strlen ($ str)-1; for ($ I = 0; $ I <$ n; $ I ++) {$ s. = $ str [rand (0, $ len)];} echo $ s. "<br/>"; $ s = "";?>
Generate multiple groups:
<? Php $ str = "0123456789abcdefghijklmnopqrstuvwxyz ~ @ # () _ "; // Output character set $ n = 10; // output String Length $ len = strlen ($ str)-1; for ($ j = 0; $ j <200; $ j ++) {for ($ I = 0; $ I <$ n; $ I ++) {$ s. = $ str [rand (0, $ len)];} echo $ s. "<br/>"; $ s = "" ;}?>
PS: here we will provide you with two online tools with similar functions for your reference:
Online random number/string generation tool:
Http://tools.jb51.net/aideddesign/suijishu
High-strength Password generator:
Http://tools.jb51.net/password/CreateStrongPassword