This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //View the demo.php file for a better code than this | |
| if ($myCaptcha['captcha_status'] == 200) { | |
| echo "Verfification Successful!"; | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //Captcha verification script | |
| require_once 'core/captcha_verify.php'; | |
| //Captcha custom JS | |
| include_once 'assets/captcha_script.php'; | |
| //Captcha custom CSS | |
| include_once 'assets/captcha_style.php'; | |
| if(isset($_POST)&& isset($_POST['submit'])){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //Specify the length of the string here | |
| $captcha_txt = generateRandomString(5); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //create a color hex | |
| $a=array( | |
| "red"=>[255, 0, 0], | |
| "green"=>[0, 155, 6], | |
| "blue"=>[0, 0, 255], | |
| "black"=>[0,0,0] | |
| ); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //You can make it last for 2 minutes or 1 minute | |
| $expire = gmdate(strtotime('+3 minutes', time())); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var num = 200; | |
| if (num < 100) { | |
| console.log('Number less than 100'); | |
| }else if(num > 100) { | |
| console.log('Number is greater than 100'); | |
| }else { | |
| console.log('Number is not an Integer'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (condition) ? (action if true) : (action if false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (if statement) { (action if true) else { (action if false) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var num = 200; | |
| (num < 100) ? console.log('Number less than 100') : | |
| (num > 100) ? console.log('Number is greater than 100') : | |
| console.log('Number is not an Integer') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form> | |
| <input name="foo" id="inp_foo" type="text"> | |
| </form> |