Recent Posts

extjs.pilotwarezhk

extjs.pilotwarezhk

Return To Blog Listing

a personal learning experience in SEO, PHP, ExtJS, LAMP, etc...

Search This Blog's Tags For:

Recent Posts Tagged With 'mt_rand'

  • Using PHP to show a random picture in a folder

    Posted on Tuesday July 8th, 2008 at 03:59 in php, banner, mt_rand, mt_srand

    Weeks ago, I received a request from one of the editors, they prepared couple banners for their blog, and they want to show them randomly. Here’s how I do it. <?php function random_banner(){ $imglist = ”; // imgfolder indicates whe...

  • Generate random password in PHP

    Posted on Tuesday April 8th, 2008 at 02:18 in php, mt_rand, random password

    For our CMS, I use a custom script to generate a random password for all users. Here is the PHP function I use: function generatePassword ( $length = 8 ) { // start with a blank password $password = “”; // define possible characters $poss...