Showing posts with label HOW TO CREATE CAPTCHA : EXAMPLE. Show all posts
Showing posts with label HOW TO CREATE CAPTCHA : EXAMPLE. Show all posts

Wednesday, February 9, 2011

The Browser Takes All - Google's new computer throws out everything but the Web.


This week, Google unveiled a computer like no other: the Cr-48, a notebook that relies on the Web for all its software applications. Yet the Web search giant thinks the notebook can compete with computers that run all kinds of installed software.
The matte black Cr-48 won't be sold to the public, but thousands are being sent to consumers and businesses who have volunteered to test it. It introduces a new kind of operating system, called Chrome OS, that turns to the Web for almost everything. Google is pitching Chrome OS as its vision for a new form of computing—one that shifts the data, functionality and almost everything else you would expect from your desktop computer into the cloud. Chrome OS will get its biggest test when Acer and Samsung start selling notebook computers customized to run the software in mid-2011.
Google's Chrome OS vision is perhaps best understood by examining the differences between Chrome OS and the operating systems commonly used today, says Sundar Pichai, the vice president of product management for Chrome OS (and the related Chrome Web browser). Those differences come from a single design decision about the relationship between a person and his computer, Pichai says.
"Operating systems today are centered on the idea that applications can be trusted to modify the system, and that users can be trusted to install applications that are trustworthy," he says, "it turns out those are bad assumptions."
In contrast, Chrome OS assumes that applications and users can't be trusted. And it has just one application: the browser. "There's a cascade of things that happen when you make this core assumption," says Linus Upson, a Google VP of engineering working on the project, from making it easier to protect against malware, to reducing the need for users to act as administrator for their own system.
Chrome OS—based on a pared-down version of the Linux operating system—automatically downloads and installs its own updates. Any data downloaded in the course of using the Web is kept carefully in a secure place, separate from the OS.
Google still needs to prove that the simplicity of Chrome OS doesn't undo its usefulness. To this end, it has built a Web "app store" to encourage developers to create Web-based software that will match the diversity and functionality of the applications that can be installed on the hard drive of a Windows or Mac computer. These apps are basically advanced websites that offer similar functionality to desktop apps software.
Users of Chrome OS—as well as the Chrome browser on a conventional computer—can search or browse the Chrome Web Store and with a single click install apps. The store has far fewer software applications than are available for a conventional machine. But some Chrome apps can compete with more traditional, desktop applications,

Wednesday, October 6, 2010

HOW TO CREATE ALPHA NUMERIC CAPTCHA ?

CREATE ALPHA NUMERIC CAPTCHA : EXAMPLE       DOWNLOAD FILE


FOLLOW THESE STEPS AND CREATE A CAPTCHA WHICH YOU CAN USE IN YOUR WEBSITE:
CAPTCHA an acronym for “completely automated public Turing test to tell computers and humans apart ". CAPTCHA technology enables you to discern human requests from computer generated requests on the Web, where such a distinction is difficult. Simply defined "Man can read machine can’t!”

In web available forms are always prone to attack by people who want to use your application for their own purposes. Many web sites use the CAPTCHA especially used to prevent bots from using various types of computing services.

The applications include preventing bots from taking part in online polls, registering for free email accounts, more recently, preventing bot-generated spam by requiring that the (unrecognized) sender pass a CAPTCHA test before the email message is delivered [implemented in Yahoo]. They have also been used to prevent people from using bots to assist with massive downloading of content from multimedia websites.

You have probably seen the CAPTCHA project in action at some of your Web destinations. Its principal tool is a randomly created image that contains a phrase unmentioned in computer-readable text on the rendered page. The form asks the user to provide the phrase. If the form post does not contain the correct phrase, you can safely assume either the human made a user error, or it wasn't a human at all.

Now it's time to put this code to work. A simple and often-used interface to implement this new security measure is the form on website. In this form you typically capture random number.





<code>
<form name="form1" method="post" action="form.php" ">
<table width="342" align="center" cellspacing="0" bgcolor="#D4D0C8">
<tr> <td align="center"><img src="php_captcha.php"></td><td align="center"> Please enter the string shown in the image in the form.<br></td><td align="center"><input name="number" type="text"></td><td><input name="Submit" type="submit" value="Submit"></td> </tr></table></form>
</code>
The following code use to create random numbers and this number are embedding with existing image file, the first line used to initiate session, which use to carry the user inputs.


session_start();
$RandomStr = md5(microtime());
$ResultStr = substr($RandomStr,0,5);
$NewImage =imagecreatefromjpeg("img.jpg");
?&gt;

The second line [md5 (microtime ())] use to generate the random string, and the resultant string is trim by using third line [substr], which returns the portion of string specified by the start and length parameters.
The function imagecreatefromjpeg ("img.jpg") is use to create a image by existing image file and as back ground ,so that you need to give an image file path.


$LineColor = imagecolorallocate($NewImage,233,239,239);
$TextColor = imagecolorallocate($NewImage, 255, 255, 255);
imageline($NewImage,1,1,40,40,$LineColor);
imageline($NewImage,1,100,60,0,$LineColor);
imagestring($NewImage, 5, 20, 10, $ResultStr, $TextColor);
?&gt;


After creation of back ground image, we generate some linear line, which is use to avoid the phrasing from random numbers, the respective lines are create by the function named imageline () and imagestring () use to draw a random string horizontally.


$_SESSION['key'] = $ResultStr;
?&gt;


The resultant random number [trimmed one], carry through session especially for validation purpose.


header("Content-type: image/jpeg");
imagejpeg($NewImage);
?&gt;


Finally above two functions are uses to display/out put the image to browser. So we can just call the particular file by through image source path, it will display the final image.


if(isset($_REQUEST['Submit'])){
$key=substr($_SESSION['key'],0,5);
$number = $_REQUEST['number'];
if($number!=$key){
echo ' Validation string not valid! Please try again!';}
else{
echo ' Your string is valid!';}
}
?&gt;



DOWNLOAD FILE




As You Like It by William SHakesspear     The 5 Love Languages: The Secret to Love That Lasts       Love, Lust & Faking It: The Naked Truth About Sex, Lies, and True Romance