Forum komputerowe, forum informatyczne, naprawa laptpów , forum windows, forum linux, Hardware, Overclocking,
[PHP]Generowanie losowego ciągu liczb, małych/dużych liter, znaków - Wersja do druku

+- Forum komputerowe, forum informatyczne, naprawa laptpów , forum windows, forum linux, Hardware, Overclocking, (https://forum.pcmod.pl)
+-- Dział: Programowanie i grafika (https://forum.pcmod.pl/forum-9.html)
+--- Dział: Webmastering (https://forum.pcmod.pl/forum-33.html)
+--- Wątek: [PHP]Generowanie losowego ciągu liczb, małych/dużych liter, znaków (/thread-171.html)



- Raga - 2009-01-21

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
}; 



RE: [PHP]Generowanie losowego ciągu liczb, małych/dużych liter, znaków - foer21 - 2009-11-01

a co dopisać jak byśmy chcieli aby losowane znaki się powtarzały


RE: [PHP]Generowanie losowego ciągu liczb, małych/dużych liter, znaków - mitchellmarsh820 - 2023-10-11

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.