Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> losowy kod
vtuner
post
Post #1





Grupa: Zarejestrowani
Postów: 220
Pomógł: 10
Dołączył: 23.08.2005
Skąd: Łódź

Ostrzeżenie: (0%)
-----


jak zrobic aby co wejscie na strone inny kod się wyswietlal tzn losowy (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
ghostrider
post
Post #2





Grupa: Zarejestrowani
Postów: 135
Pomógł: 0
Dołączył: 30.09.2005
Skąd: k-rk

Ostrzeżenie: (0%)
-----


nie bardzo wiadomo o co ci chodzi, ale kiedys napisałem taka func.

  1. <?php
  2. function str_rand( $length=32 ) {
  3. $l = ($length > 32) ? 32 : $length;
  4. $str = md5(rand(0,mktime()));
  5. $c = 32 - $length;
  6. $s = rand(0, $c);
  7. return substr($str, $s, $l);
  8. }
  9. ?>


Ten post edytował ghostrider 17.11.2005, 10:58:49
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 5.10.2025 - 07:17