HTML |
<head> <?php function Random() { $FILE = file("faq.txt"); $rand = rand(0, count($FILE)-1); return $FILE[$rand]; } ?> </head> <body> <?php echo(Random()); ?> <?php echo(Random()); ?> <?php echo(Random()); ?> <?php echo(Random()); ?> <?php echo(Random()); ?> <?php echo(Random()); ?> </body> faq.txt: <a href="faq.html" class="answers" style="font-family:Tahoma; text-decoration:none; color:#444A55; font-size:13px; width:100% position:absolute; top:5px;" onmouseover="this.style.color='#959BA5'" onmouseout="this.style.color='#444A55'">1</a><br /> <a href="faq.html" class="answers" style="font-family:Tahoma; text-decoration:none; color:#444A55; font-size:13px; width:100% position:absolute; top:5px;" onmouseover="this.style.color='#959BA5'" onmouseout="this.style.color='#444A55'">2</a><br /> <a href="faq.html" class="answers" style="font-family:Tahoma; text-decoration:none; color:#444A55; font-size:13px; width:100% position:absolute; top:5px;" onmouseover="this.style.color='#959BA5'" onmouseout="this.style.color='#444A55'">3</a><br /> |
PHP |
mt_rand() |
PHP |
<? mt_rand(1, 99); |
PHP |
<? echo mt_rand(1, 99); |