Thursday, 22 September 2011

How to generate a random password using php

Here there is a simple example for generate a random password using php, it is quite easy and simple to make.

$length =10; // the length of the required password length
$characters_to_use ="abcdef1234567890"; // characters are to be use in your password
for($i = 0; $i < $length; $i++)
$do = mt_rand(0,strlen($characters_to_use)-1);
$password = $password . $characters_to_use{$do};

echo $password; // here you can view the password 

Wednesday, 21 September 2011

Hide navbar from blogger

If you want to hide or remove the navigation bar which is appear on the top region of your blogger, follow these steps

1. Login to your blogger.
2. Click "Designs".
3. Goes to "Template Manager", a template editor will be open.
4. Click on "Advanced" and then "Add css".
5. Then at right side text box areas put the below mentioned css code . and then click on "apply to Blog" option for saving this property to your blogger.

#navbar {
height: 0px;
visibility: hidden;
display: none;

6. Watch the changes in your browser.

Monday, 19 September 2011

php web development tools - captcha

Web development tool  CAPTCHA, stands for Completely Automated Public Turing to tell Computers and Humans Apart.

A CAPTCHA is a program that can generate distorted text  that humans can see or listen but computer cannot. 

Applications of CAPTCHA systems
-- Preventing Spam in Blogs.
-- Protecting Website Registration.
-- Search Engine Bots.
-- Worms and Spam.

In web application development we can use the following CAPTCHA systems that are listed below
reCAPTCHA - In this type of CAPTCHA systems user can view the distorted text or also listen the text, now a days it is most popular CAPTCHA systems for web developers

Securimage  : The Securimage Captcha script is free open-source. here the  PHP script is used to generat complex images and complex CAPTCHA alphanumeric codes.

FreeCap - This script support GPL CAPTCHA script systems to stop spam

Sunday, 18 September 2011

function with static variables

static variables can not be reset
values can not change after execution
can not accessible through out the programme

function with global variables

accesible through program.
it generates a unique value after execution
can not assign any values at the time of declaring it or using it

php functions

means set of instructions
the basic syntax
function <function name>($arguments1, $arguments2, ......) {

It has four parts
-Special word function
-names that u want to give your function name
- function parameters list precided by dollar sign
- function body brace enclosed set of statements


function xyz()

php is HTML embeddedness

Php is embedded within HTML.
 All embeded scripting language don't need to be compiled into binary code before they can be tested or used , just write  and run.
but PHP is interpreted.

PHP is portable (Cross Platform  Compatible)

we can developed on any client OS and then uploaded your  php script to a server on any OS.
Not tag based
Related Posts Plugin for WordPress, Blogger...