____  ___    _  _     _   _ _____     _______
 / ___|/ _ \  | || |   | | | |_ _\ \   / / ____|
| |  _| | | | | || |_  | |_| || | \ \ / /|  _|
| |_| | |_| | |__   _| |  _  || |  \ V / | |___
 \____|\___/     |_|   |_| |_|___|  \_/  |_____|

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

TUTORIAL || HOW TO MAKE CAPTCHA BY USING PHP PROGRAMMING METHOD

BY: @sametravel | CREATED: Feb. 23, 2018, 4:10 p.m. | VOTES: 9 | PAYOUT: $0.00 | [ VOTE ]

What Will I Learn?

Requirements

Difficulty

Tutorial Contents

CAPTCHAor Captcha is a form of challange-response test used in computing to ensure that answers are not produced by a computer. This process usually involves a computer (server) that asks a user to complete a simple test that the computer can generate and evaluate. Because other computers can not solve CAPTCHA, any user who can provide the correct answer will be considered a human. Therefore, this test is sometimes referred to as the Turing back test, as it is administered by machines and intended for humans, as opposed to the standard Turing test that is normally administered by humans and intended for a machine. CAPTCHA generally uses letters and numbers from distorted images that appear on the screen.

CAPTCHA is primarily used to prevent automated software (bot) from performing the same actions as people signing up or logging on and forth. For example when signing up for a new email account, you will find a CAPTCHA at the bottom of the sign-up, This is actually to ensure that the form can only be populated by humans rather than automated software or bot computers. Try to imagine it is impossible for a bot to guess exactly the CAPTCHA produced

index.php

"
< !DOCTYPE html>

< html>

< head>

&lt; title&gt;HOW TO MAKE CAPTCHA USING PHP PROGRAMMING METHOD

&lt; link rel="stylesheet" type="text/css" href="style.css"&gt;

< /head>

< body>
< h1>HOW TO MAKE CAPTCHA USING PHP PROGRAMMING METHOD< /h1>
< div class="kotak">

    Captcha tidak sesuai.";
        }
    }
    ?&gt;

Enter Captcha

                Captcha


            Enter captcha

< /body>
< /html>
"

style.css

"
body{
font-family: "roboto";
background: #F4F4F4;
}

h1,p{
text-align: center;
}

.kotak{
margin: 10px auto;
background: #fff;

width: 400px;
padding: 20px 0px;

}

.kotak table tr td{
padding: 5px;
}

.kotak table tr td input{
padding: 5px;
font-size: 12pt;
}
"

captcha.php

"

"

periksa_captcha.php

"
< !DOCTYPE html>

< html>

< head>
< title>HOW TO MAKE CAPTCHA USING PHP PROGRAMMING METHOD< /title>

&lt; link rel="stylesheet" type="text/css" href="style.css "&gt;

< /head>

< body>

&lt; h1&gt;HOW TO MAKE CAPTCHA USING PHP PROGRAMMING METHOD

&lt; div class="kotak"&gt;  
    Your Captcha right";
    }
    ?&gt;
&lt; /div&gt;

< /body>
< /html>

Program Explanation

"
session_start();
"

"
header("Content-type: image/png");
"

"
session_start();

header("Content-type: image/png");

$_SESSION["Captcha"]="";

$gbr = imagecreate(200, 50);

imagecolorallocate($gbr, 69, 179, 157);

$color = imagecolorallocate($gbr, 253, 252, 252);
$font = "BERNHC.ttf";
$ukuran_font = 20;
$posisi = 32;

for($i=0;$i<=5;$i++) {

$angka=rand(0, 9);

$_SESSION["Captcha"].=$angka;

$kemiringan= rand(20, 20);

imagettftext($gbr, $ukuran_font, $kemiringan, 8+15*$i, $posisi, $color, $font, $angka);

}

imagepng($gbr);
imagedestroy($gbr);
"

"
for($i=0;$i<=5;$i++) {

$angka=rand(0, 9);

$_SESSION["Captcha"].=$angka;

$kemiringan= rand(20, 20);

imagettftext($gbr, $ukuran_font, $kemiringan, 8+15*$i, $posisi, $color, $font, $angka);

}
"

"
imagettftext($gbr, $ukuran_font, $kemiringan, 8+15*$i, $posisi, $color, $font, $angka);
"

"
$font = "Allura-Regular.otf";
"

[IMAGE: https://res.cloudinary.com/hpiynhbhq/image/upload/v1519401778/hla2owqecvieu6psskos.png]

[IMAGE: https://res.cloudinary.com/hpiynhbhq/image/upload/v1519402096/ukovj8chhgjc5l2d5odi.png]

[IMAGE: https://res.cloudinary.com/hpiynhbhq/image/upload/v1519402112/pcgshyggod3hbeloomjn.png]

[IMAGE: https://res.cloudinary.com/hpiynhbhq/image/upload/v1519402131/acuhekfeiwdcqsuonbvg.png]

Posted on Utopian.io - Rewarding Open Source Contributors

TAGS: [ #utopian-io ] [ #php ] [ #captcha ] [ #programming ] [ #web ]

Replies

@amosbastian | Feb. 24, 2018, 12:29 p.m. | Votes: 0 | [ VOTE ]

Your contribution cannot be approved because it does not follow the Utopian Rules, and is considered as plagiarism. Plagiarism is not allowed on Utopian, and posts that engage in plagiarism will be flagged and hidden forever.

Plagiarised from here.

You can contact us on Discord.
[utopian-moderator]

@steemcleaners | Feb. 26, 2018, 12:44 p.m. | Votes: 1 | [ VOTE ]

Source: https://www.malasngoding.com/cara-membuat-captcha-dengan-php/

Not indicating that the content you copy/paste is not your original work could be seen as plagiarism.

Some tips to share content and add value:
- Use a few sentences from your source in “quotes.” Use HTML tags or Markdown.
- Linking to your source
- Include your own original thoughts and ideas on what you have shared.

Repeated plagiarized posts are considered spam. Spam is discouraged by the community, and may result in action from the cheetah bot.

Creative Commons: If you are posting content under a Creative Commons license, please attribute and link according to the specific license. If you are posting content under CC0 or Public Domain please consider noting that at the end of your post.

If you are actually the original author, please do reply to let us know!

Thank You!

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>