Tuesday, 1 July 2014

Captcha Using PHP



CAPTCHA  which stands for “Completely Automated Public Turing test to tell Computers and Humans Apart” is a type o f challenge-response test to ensure that the response is only generated by humans and not by a computer.

In simple words, CAPTCHA is the word verification test that you will come across the end of a sign-up form while signing up for Gmail or Yahoo account. The following image shows the typical samples of CAPTCHA.

You can make captcha using PHP. Here I am making number captcha which is achieved by an image. This image text is dynamically create by php and stored in session. A user can verify whether valid captcha has been entered or not.



Save this code in named captch.php

<?php 
session_start(); 
$text = rand(10000,99999); 
$_SESSION["vercode"] = $text; 
$height = 25; 
$width = 65; 
  

Monday, 16 June 2014

What is the Difference Between Electronic and Electric?



In a number of instances, people tend to use the terms electronic and electricinterchangeably. While both terms are commonly employed when discussing electronics, there is a subtle difference between the correct usage of each word. Here is what you should know about the proper way to make use of both electronic and electric when speaking or writing.


Electric has to do with the general concept of electricity. It is generally acceptable to use the terms electric and electrical interchangeably. Essentially, the word "electric" will function as a way of qualifying the flow of electricity as it relates to a specific event. For example, if a fire starts due to a problem with wiring in a building, the event can be described as an electric or electrical fire, caused by the electric or electrical wiring. The use of electric identifies a source of power that serves to create a logical effect when conducted through a process or device.

Sunday, 8 June 2014

Time Measurement Unit

Units for measuring time


half-hour
 NOUN
a period of 30 minutes
hour
 NOUN
a period of time that consists of 60 minutes. 30 minutes is usually called half an hour, 15 minutes can be called a quarter of an hour,and 45 minutes can be called three-quarters of an hour
hr
 ABBREVIATION
hour
m
 ABBREVIATION
minute

Thursday, 5 June 2014

Shannon Channel Capacity

In 1944 Claude Shannon introduce a formula to determine the theoretical highest data rate for a a channel
C=B log 2(1+S/n)
In this formula, B is the bandwidth of the channel. S/N is the signal to noice ratio and C is the capacity (Shannon Capacity) in BPS.
We can calculate the theoretical highest bit rate of regular telephone.
A Telephone line normally has a bandwidth of 3000Hz. The signal to noise ratio is usually 3162-(35db) for this channel capacity is

       C=B log 2 (1+S/N)
       C=3000 log2 ((1+3162)
       C=3000 log2 (3163)
       C=3000*1162

       C=34860 BPS