Recent Posts
extjs.pilotwarezhk
Return To Blog Listing
a personal learning experience in SEO, PHP, ExtJS, LAMP, etc...
Recent Posts Tagged With 'php'
Fight spam with reCAPTCHA
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
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
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
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
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)
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...
