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 'php'

  • Fight spam with reCAPTCHA

    Posted on Monday August 18th, 2008 at 08:20 in php, spam, mediawiki, recaptcha, spam fighting

    There are couple form on our website, however, the original developer forgotten to put in some kind of measure to keep the spam away from our website. After running for some time, we found that our database are now filled with junk data. After doi...

  • 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...

  • Email address syntax verification in PHP

    Posted on Wednesday June 11th, 2008 at 04:24 in php, email, syntax, verification, checkdnsrr, preg_match

    When you’re composing a contact form, you always need the visitors to leave their email address, but how can we make sure the email address is correct? Well, you can first verifying their syntax. We’re here to define the first checking fu...

  • rand() PHP function

    Posted on Thursday April 24th, 2008 at 02:23 in php, random number

    In many occasion, you need to generate a random number in your PHP script. CAPTCHA, generating random password, etc. Then you need the rand() function. Definition: The rand () function is used to generate a random number in PHP. It can also be used t...

  • 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...

  • Alternative PHP Cache (APC)

    Posted on Thursday January 10th, 2008 at 03:09 in php, optimization, optimize, apc, accelerator, caching, alternative php cache, php optimization

    APC is an Open Source PHP accelerator for caching intermediate code from scripts. Intermediate code is the internal memory structures produced during compilation that are fed into the executor. APC increases the performance of PHP scripts by cachi...