PluginProbe
RSVP and Event Management / 1.3.0
RSVP and Event Management v1.3.0
trunk 0.5.0 0.6.0 0.7.0 0.8.0 0.9.0 0.9.5 1.0.0 1.1.0 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.5.0 1.6.0 1.6.1 1.6.2 1.6.5 1.7.0 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 All 136 releases
rsvp / jquery-validate / demo / captcha / images / image.php

image.php in RSVP and Event Management 1.3.0, at jquery-validate/demo/captcha/images/image.php

35 lines 856 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Begin the session
4 session_start();
5
6 // If the session is not present, set the variable to an error message
7 if(!isset($_SESSION['captcha_id']))
8 $str = 'ERROR!';
9 // Else if it is present, set the variable to the session contents
10 else
11 $str = $_SESSION['captcha_id'];
12
13 // Set the content type
14 //header('Content-type: image/png');
15 header('Cache-control: no-cache');
16
17 // Create an image from button.png
18 $image = imagecreatefrompng('button.png');
19
20 // Set the font colour
21 $colour = imagecolorallocate($image, 183, 178, 152);
22
23 // Set the font
24 $font = '../fonts/Anorexia.ttf';
25
26 // Set a random integer for the rotation between -15 and 15 degrees
27 $rotate = rand(-15, 15);
28
29 // Create an image using our original image and adding the detail
30 imagettftext($image, 14, $rotate, 18, 30, $colour, $font, $str);
31
32 // Output the image as a png
33 imagepng($image);
34
35 ?>