Create a PHP captcha using simple PHP image handling functions. Creating a PHP Captcha image explained. The only difference between a captcha and a normal text written on an image is the former generates random strings and places it crookedly on the image making it difficult for bots to find out. This PHP captcha tutorial will make use of six image functions imagecreate(), imagecolorallocate(), imageline(), imagettftext(), imagepng(), imagedestroy(). You can feel free to modify it and add more functions to bring visual effects. For PHP Random string generation see the previous article.Continue Reading…
PHP random string generation
Generate a random alphanumeric string containing both uppercase and lowercase characters in PHP. The rand() function in PHP generates a random number we’ll be using this function to generate a random alphanumeric string. A variable should be declared containing all the alphabets in English both uppercase and lowercase (A-Z and a-z) and numbers from 0-9. The concept here is to randomly pick a character from the string containing all the characters and assign it to a variable. Each time this process is done the currently randomly selected character is concatenated with the previously generated characters. This should be done as many times the length of the random string required. For this a looping statement can be used.Continue Reading…
PHP error_log .htaccess
The PHP error_log setting specifies in which file the PHP script errors are logged. This setting is usually specified in the PHP configuration file php.ini which points to a file in which errors of all PHP scripts on that server are logged. It can be modified per directory basis to maintain separate logs for different set of scripts. For users on shared hosting account it is a bonus feature of being able to modify the error_log setting. Normally the error log is a single file for an entire server which is stored in one central place which is only accessible by the root user. But by modifying the error_log setting using htaccess you can have a separate error log for your web hosting account. The php_value error_log requires the php_flag log_errors to be On.Continue Reading…
Internet Explorer Change User Agent
Modify the user agent string sent by Internet Explorer by editing the windows registry. Internet Explorer sends a user agent string containing information about the IE version, OS version and some other information. You can edit it to add your own personal touch or to personalize your visit to a webpage. An example for a user agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) if you carefully look at this string you can find that MSIE 6.0 denotes Microsoft Internet Explorer 6.0 and Windows NT 5.1 shows the kernel version of a Windows XP operating System.Continue Reading…
CSS Horizontal Navigation Menu
CSS Horizontal Navigation Menu is the basic menu sent on most of the websites just below theĀ logo. It is very easy to create this type of menu using HTML unordered lists and CSS. It is search engine friendly and uses a tableless design. The CSS Horizontal Menu will be created with a hover effect to spice up things. This will change the color and style of a menu item when the mouse pointer is moved over it. Lets start step-by-step building the CSS Horizontal MenuContinue Reading…
Javascript Simple Slideshow
Create a Simple slideshow using Javascript and HTML which is very easy to understand and implement. This is a no frills slideshow without any special effects and aims at beginners. As you learn more you can add more special effects. The Javascript Simple Slideshow works by changing the src attribute of the img tag to the list of image locations specified in an array variable. And finally I’ll show you how to preload the images so that the transition takes place smoothly.Continue Reading…
- « Previous Page
- 1
- …
- 16
- 17
- 18
- 19
- 20
- …
- 25
- Next Page »