Forum komputerowe, forum informatyczne, naprawa laptpów , forum windows, forum linux, Hardware, Overclocking,

Pełna wersja: [PHP]Generowanie losowego ciągu liczb, małych/dużych liter, znaków
Aktualnie przeglądasz uproszczoną wersję forum. Kliknij tutaj, by zobaczyć wersję z pełnym formatowaniem.
Poniższa funkcja generuje losowy ciąg znaków, składający sie z liczb, małych/dużych liter i znaków.
Jako argument pobiera długość ciągu.

Kod PHP:
function GenRandom($howlong

$chars "abcdefghijklmnoprstuwxyzq"
$chars .= "ABCDEFGHIJKLMNOPRSTUWZYXQ"
$chars .= "1234567890"
$chars .= "~`!@#$%^&*()_+-={}[]:\";'<>?,./\|";
$pass ""
$len strlen($chars) - 1
for(
$i =0$i $howlong$i++) 
  { 
   
$random rand(0$len); 

       
$output .=  $chars[$random]; 
   } 
return 
$output
}; 
a co dopisać jak byśmy chcieli aby losowane znaki się powtarzały
Creating a robust and secure system for generating random strings, including numbers, lowercase/uppercase letters, and special characters, is crucial in the academic world. Researchers and students often deal with sensitive data, so privacy is important. When seeking Online Dissertation Help London UK , having a reliable data encryption system and secure access is invaluable. It's not just about the content itself; it's also about protecting the research process, making the quest for academic excellence a seamless and protected journey.